From f93ecb280a2f1820171ea225eca41bd26e5fdea1 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 27 Sep 2018 10:52:42 +0000 Subject: [PATCH] Fix for deleted template function in alternate language, issue #1127 git-svn-id: svn://192.168.202.10@3044 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_admin_template_maker.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/www/vicidial/AST_admin_template_maker.php b/www/vicidial/AST_admin_template_maker.php index 52603249..8ad7db8f 100644 --- a/www/vicidial/AST_admin_template_maker.php +++ b/www/vicidial/AST_admin_template_maker.php @@ -1,5 +1,5 @@ LICENSE: AGPLv2 # @@ -16,6 +16,7 @@ # 170409-1532 - Added IP List validation code # 180324-0942 - Enforce User Group campaign permissions for templates based on list_id # 180503-2215 - Added new help display +# 180927-0633 - Fix for deleted template function in alternate language, issue #1127 # require("dbconnect_mysqli.php"); @@ -158,7 +159,7 @@ header ("Content-type: text/html; charset=utf-8"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 -if ($submit_template=="SUBMIT TEMPLATE" && $template_id && $template_name && $template_list_id && $standard_fields_layout) +if ($submit_template==_QXZ("SUBMIT TEMPLATE") && $template_id && $template_name && $template_list_id && $standard_fields_layout) { $status_str=""; @@ -192,7 +193,7 @@ if ($submit_template=="SUBMIT TEMPLATE" && $template_id && $template_name && $te $error_msg=_QXZ("TEMPLATE CREATION FAILED")."
\n$errno - $error
\n[$ins_stmt]"; } } -else if ($delete_template=="DELETE TEMPLATE" && $template_id) +else if ( ($delete_template == _QXZ("DELETE TEMPLATE")) and (strlen($template_id) > 0) ) { $delete_stmt="delete from vicidial_custom_leadloader_templates where template_id='$template_id'"; $delete_rslt=mysql_to_mysqli($delete_stmt, $link); @@ -345,12 +346,12 @@ function loadIFrame(form_action, field_value) { document.forms[0].action="leadloader_template_display.php?form_action="+form_action; } function checkForm(form_name) { - var error_msg="The form cannot be submitted for the following reasons: \n"; - if (form_name.template_id.value=="") {error_msg+=" - Template ID is missing\n";} - else if (form_name.template_id.value.length<2) {error_msg+=" - Template ID needs to be at least 2 characters long<\n";} - if (form_name.template_name.value=="") {error_msg+=" - Template name is missing\n";} - if (form_name.template_list_id.value=="") {error_msg+=" - List ID is missing\n";} - if (form_name.standard_fields_layout.value=="" && form_name.custom_fields_layout.value=="") {error_msg+=" - There does not seem to be a layout\n";} + var error_msg = ": \n"; + if (form_name.template_id.value=="") {error_msg += " - \n";} + else if (form_name.template_id.value.length<2) {error_msg += " - \n";} + if (form_name.template_name.value=="") {error_msg += " - \n";} + if (form_name.template_list_id.value=="") {error_msg += " - \n";} + if (form_name.standard_fields_layout.value=="" && form_name.custom_fields_layout.value=="") {error_msg += " - \n";} if (error_msg.length>=80) {alert(error_msg); return false;} else {return true;} } @@ -513,7 +514,7 @@ if (mysqli_num_rows($template_rslt)>0) { - +