mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSform: fix displaying error in form in case of global error
This commit is contained in:
parent
957777d44f
commit
9680f8a18e
1 changed files with 8 additions and 6 deletions
|
@ -359,12 +359,14 @@ var LSform = new Class({
|
|||
this.submitting = false;
|
||||
this.LSform.removeClass('submitting');
|
||||
var data = JSON.decode(responseText);
|
||||
if ( varLSdefault.checkAjaxReturn(data) ) {
|
||||
this.resetErrors();
|
||||
if ($type(data.LSformErrors) == 'object') {
|
||||
data.LSformErrors = new Hash(data.LSformErrors);
|
||||
data.LSformErrors.each(this.addError,this);
|
||||
}
|
||||
// Handle common Ajax return checks
|
||||
varLSdefault.checkAjaxReturn(data);
|
||||
|
||||
// Handle LSform errors
|
||||
this.resetErrors();
|
||||
if (data && $type(data.LSformErrors) == 'object') {
|
||||
data.LSformErrors = new Hash(data.LSformErrors);
|
||||
data.LSformErrors.each(this.addError, this);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue