From 6066a8d58f5ca4892dcbfecf0f4cdd73a47d677c Mon Sep 17 00:00:00 2001 From: Thorben Bochenek Date: Mon, 8 Feb 2016 09:52:09 +0100 Subject: [PATCH] Issue137: Also check if current identifier is not an empty string --- src/settings/templates/EditFieldPopup.tpl | 39 ++++++++++++----------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/settings/templates/EditFieldPopup.tpl b/src/settings/templates/EditFieldPopup.tpl index db3ebd9..571981a 100755 --- a/src/settings/templates/EditFieldPopup.tpl +++ b/src/settings/templates/EditFieldPopup.tpl @@ -80,8 +80,8 @@ {vtranslate("LBL_FIELD_NUMERIC_TYPE", $QUALIFIED_MODULE)} - {vtranslate("LBL_FIELD_INTEGER", $QUALIFIED_MODULE)} - {vtranslate("LBL_FIELD_DECIMAL", $QUALIFIED_MODULE)} + {vtranslate("LBL_FIELD_INTEGER", $QUALIFIED_MODULE)} + {vtranslate("LBL_FIELD_DECIMAL", $QUALIFIED_MODULE)} {vtranslate("LBL_FIELD_NEGATIVE_NUMBER", $QUALIFIED_MODULE)} @@ -90,7 +90,7 @@ {vtranslate("LBL_FIELD_DEFAULT_DATE", $QUALIFIED_MODULE)} - {vtranslate("LBL_GENERATED_TYPE_1", $QUALIFIED_MODULE)} + {vtranslate("LBL_GENERATED_TYPE_1", $QUALIFIED_MODULE)} {vtranslate("LBL_GENERATED_TYPE_2", $QUALIFIED_MODULE)} @@ -114,9 +114,9 @@ {vtranslate("LBL_FIELD_DISPLAY_TYPE", $QUALIFIED_MODULE)} - {vtranslate("LBL_DISPLAY_TYPE_1", $QUALIFIED_MODULE)} - {vtranslate("LBL_DISPLAY_TYPE_2", $QUALIFIED_MODULE)} - {vtranslate("LBL_DISPLAY_TYPE_3", $QUALIFIED_MODULE)} + {vtranslate("LBL_DISPLAY_TYPE_1", $QUALIFIED_MODULE)} + {vtranslate("LBL_DISPLAY_TYPE_2", $QUALIFIED_MODULE)} + {vtranslate("LBL_DISPLAY_TYPE_3", $QUALIFIED_MODULE)} @@ -176,7 +176,7 @@ function md_addRelatedModule() var row2 = $(".add_related_list:first").html(); $(".add_related_list:last").after(''+row+''+row1+''+row2+''); - + $(".delete-related-module:gt(0)").show(); {rdelim} @@ -201,13 +201,13 @@ function md_showOrHideCustomField(cb) function deleteCustomValues(array) {ldelim} var output=[]; - + for(var i=0; i 0 && + window.parent.md_entityIdentifier != o_data.oldFieldName) + { alert(window.parent.md_vtranslate("LBL_NOT_POSSIBLE_TO_HAVE_SEVERAL_FIELDS_AS_IDENTIFIER")); return false; @@ -273,23 +276,23 @@ function md_popupSave() window.parent.md_entityIdentifier = undefined; } } - + if(o_data.UITypeNum == 10) { o_data.relatedModule = deleteCustomValues(o_data.relatedModule); } {foreach item=language from=$a_languages} - o_data.label_{$language} = $("input[name='label-{$language}']").val(); + o_data.label_{$language} = $("input[name='label-{$language}']").val(); {/foreach} {foreach item=language from=$a_languages} o_data.helpInfoLabel_{$language} = $("input[name='help-info-label-{$language}']").val(); {/foreach} - + var valid = false; var field = ''; - + if(o_data.label == '' || o_data.label == 'LBL_') field = '{addslashes(vtranslate("LBL_FIELD_LABEL", $QUALIFIED_MODULE))}'; {foreach item=language from=$a_languages} @@ -317,4 +320,4 @@ else if(o_data.isEntityIdentifier && o_data.entityIdentifierFieldName == '') {rdelim} - \ No newline at end of file +