N°1344 - Save without all mandatory attributes (ajax reload not finished)

This commit is contained in:
acognet
2020-04-02 17:46:18 +02:00
parent d7211509bd
commit fc2fb235a2
3 changed files with 10 additions and 0 deletions

View File

@@ -422,6 +422,7 @@ Dict::Add('EN US', 'English', 'English', array(
'UI:Button:Insert' => 'Insert',
'UI:Button:More' => 'More',
'UI:Button:Less' => 'Less',
'UI:Button:Wait' => 'Please wait while updating fields',
'UI:SearchToggle' => 'Search',
'UI:ClickToCreateNew' => 'Create a new %1$s',

View File

@@ -405,6 +405,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
'UI:Button:Insert' => 'Insérer',
'UI:Button:More' => 'Plus',
'UI:Button:Less' => 'Moins',
'UI:Button:Wait' => 'Patientez pendant la mise à jour des champs',
'UI:SearchToggle' => 'Recherche',
'UI:ClickToCreateNew' => 'Créer un nouvel objet de type %1$s',

View File

@@ -143,6 +143,13 @@ var oFormErrors = { err_form0: 0 };
function CheckFields(sFormId, bDisplayAlert)
{
// if some fields are in wait, no submit is allowed
if ($('#'+sFormId+' .blockMsg').length>0)
{
alert(Dict.S('UI:Button:Wait'));
return false;
}
$('#'+sFormId+' :submit').prop('disable', true);
$('#'+sFormId+' :button[type=submit]').prop('disable', true);
firstErrorId = '';
@@ -171,6 +178,7 @@ function CheckFields(sFormId, bDisplayAlert)
$('#'+oFormErrors['input_'+sFormId]).focus();
}
}
return (oFormErrors['err_'+sFormId] == 0); // If no error, submit the form
}