diff --git a/templates/CRM/Contact/Import/Form/MapTable.tpl b/templates/CRM/Contact/Import/Form/MapTable.tpl
index e0fbce6125fb..b13969c0fddd 100644
--- a/templates/CRM/Contact/Import/Form/MapTable.tpl
+++ b/templates/CRM/Contact/Import/Form/MapTable.tpl
@@ -7,111 +7,26 @@
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-
+ });
+ }
+ });
+
+ {/literal}
+{/if}
diff --git a/templates/CRM/Import/Form/MapTableCommon.tpl b/templates/CRM/Import/Form/MapTableCommon.tpl
new file mode 100644
index 000000000000..83fa1fcc8e48
--- /dev/null
+++ b/templates/CRM/Import/Form/MapTableCommon.tpl
@@ -0,0 +1,92 @@
+
diff --git a/templates/CRM/common/highLightImport.tpl b/templates/CRM/common/highLightImport.tpl
index bd9156c941c2..6279ff532b90 100644
--- a/templates/CRM/common/highLightImport.tpl
+++ b/templates/CRM/common/highLightImport.tpl
@@ -14,7 +14,7 @@ CRM.$(function($) {
$.each(highlightedFields, function() {
$('select[id^="mapper"][id$="_0"] option[value='+ this + ']').append(' *').css({"color":"#FF0000"});
});
- {/literal}{if $relationship}{literal}
+ {/literal}{if $highlightedRelFields}{literal}
var highlightedRelFields = {/literal}{$highlightedRelFields|@json_encode}{literal};
function highlight() {
var select, fields = highlightedRelFields[$(this).val()];