浏览代码

Fixed another regression of 3500: LongTextFields also support multiple forbidden lists...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3505 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 10 年之前
父节点
当前提交
f9d82a5195
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      application/forms.class.inc.php

+ 2 - 4
application/forms.class.inc.php

@@ -960,12 +960,10 @@ class DesignerLongTextField extends DesignerTextField
 		if (is_array($this->aForbiddenValues))
 		{
 			$sForbiddenValues = json_encode($this->aForbiddenValues);
-			$sExplainForbiddenValues = addslashes($this->sExplainForbiddenValues);
 		}
 		else
 		{
-			$sForbiddenValues = 'null';
-			$sExplainForbiddenValues = 'null';
+			$sForbiddenValues = '[]'; //Empty JS array
 		}
 		$sMandatory = $this->bMandatory ? 'true' :  'false';
 		$sCSSClasses = '';
@@ -977,7 +975,7 @@ class DesignerLongTextField extends DesignerTextField
 		{
 			$oP->add_ready_script(
 <<<EOF
-$('#$sId').bind('change keyup validate', function() { ValidateWithPattern('$sId', $sMandatory, '$sPattern',  $(this).closest('form').attr('id'), $sForbiddenValues, '$sExplainForbiddenValues'); } );
+$('#$sId').bind('change keyup validate', function() { ValidateWithPattern('$sId', $sMandatory, '$sPattern',  $(this).closest('form').attr('id'), $sForbiddenValues); } );
 {
 	var myTimer = null;
 	$('#$sId').bind('keyup', function() { clearTimeout(myTimer); myTimer = setTimeout(function() { $('#$sId').trigger('change', {} ); }, 100); });