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

SVN:trunk[3505]
This commit is contained in:
Denis Flaven
2015-03-12 15:26:08 +00:00
parent 6524a40eaa
commit 95fc4d867d

View File

@@ -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); });