- The fields required can be filled with empty spaces.
- Was add validation.ces/ldapAdvancedEdit.xml
This commit is contained in:
@@ -110,6 +110,7 @@
|
|||||||
|
|
||||||
triTitle = triTitle.replace(/^\s*|\s*$/g,"");
|
triTitle = triTitle.replace(/^\s*|\s*$/g,"");
|
||||||
if (triTitle == '') {
|
if (triTitle == '') {
|
||||||
|
document.getElementById('TRI_TITLE').focus();
|
||||||
alert(G_STRINGS.ID_REQUIRED_NAME_TRIGGERS);return false;
|
alert(G_STRINGS.ID_REQUIRED_NAME_TRIGGERS);return false;
|
||||||
}
|
}
|
||||||
document.getElementById('TRI_TITLE').value = triTitle;
|
document.getElementById('TRI_TITLE').value = triTitle;
|
||||||
@@ -119,9 +120,12 @@
|
|||||||
for (i=0; i<fieldsRequired.length; i++)
|
for (i=0; i<fieldsRequired.length; i++)
|
||||||
{
|
{
|
||||||
var field = document.getElementById(fieldsRequired[i]).value;
|
var field = document.getElementById(fieldsRequired[i]).value;
|
||||||
|
field = field.replace(/^\s*|\s*$/g,"");
|
||||||
if (field == '') {
|
if (field == '') {
|
||||||
|
document.getElementById(fieldsRequired[i]).focus();
|
||||||
alert(_('ID_REQUIRED_FIELDS_ERROR'));return false;
|
alert(_('ID_REQUIRED_FIELDS_ERROR'));return false;
|
||||||
}
|
}
|
||||||
|
document.getElementById(fieldsRequired[i]).value = field;
|
||||||
}
|
}
|
||||||
if(triUid==''){
|
if(triUid==''){
|
||||||
reqName=ajax_function("../triggers/triggers_Save",'lookforNameTrigger','NAMETRIGGER='+encodeURIComponent(triTitle)+'&proUid='+(document.getElementById('PRO_UID').value),'POST') ;
|
reqName=ajax_function("../triggers/triggers_Save",'lookforNameTrigger','NAMETRIGGER='+encodeURIComponent(triTitle)+'&proUid='+(document.getElementById('PRO_UID').value),'POST') ;
|
||||||
|
|||||||
Reference in New Issue
Block a user