mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Prevent the JS validation (on focus) to create multiple entries for the same field, since it breaks the validation.
SVN:trunk[3421]
This commit is contained in:
@@ -266,7 +266,11 @@ function ValidateWithPattern(sFieldId, bMandatory, sPattern, sFormId, aForbidden
|
||||
if (!bValid)
|
||||
{
|
||||
$('#v_'+sFieldId).addClass('ui-state-error');
|
||||
oFormValidation[sFormId].push(sFieldId);
|
||||
iFieldIdPos = jQuery.inArray(sFieldId, oFormValidation[sFormId]);
|
||||
if (iFieldPos == -1)
|
||||
{
|
||||
oFormValidation[sFormId].push(sFieldId);
|
||||
}
|
||||
if (sMessage)
|
||||
{
|
||||
$('#'+sFieldId).attr('title', sMessage).tooltip();
|
||||
|
||||
Reference in New Issue
Block a user