mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSform : Added display of errors of elements not displayed on the LSform warnBox
This commit is contained in:
parent
30d9fd00c3
commit
b1f3f3a16f
1 changed files with 17 additions and 7 deletions
|
@ -27,14 +27,15 @@ var LSform = new Class({
|
|||
this.params={};
|
||||
}
|
||||
this._ajaxSubmit=this.params.ajaxSubmit;
|
||||
if ($type(this.params.warnings)) {
|
||||
this.warnBox = new LSinfosBox({
|
||||
name: 'LSformWarnBox',
|
||||
fxDuration: 600,
|
||||
closeBtn: 1,
|
||||
autoClose: 0
|
||||
});
|
||||
|
||||
this.warnBox = new LSinfosBox({
|
||||
name: 'LSformWarnBox',
|
||||
fxDuration: 600,
|
||||
closeBtn: 1,
|
||||
autoClose: 0
|
||||
});
|
||||
|
||||
if ($type(this.params.warnings)) {
|
||||
this.warnTxt = '<ul>';
|
||||
this.params.warnings.each(function(w) {
|
||||
this.warnTxt +='<li>'+w+'</li>';
|
||||
|
@ -272,6 +273,15 @@ var LSform = new Class({
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.tmp=name+" :</br><ul>";
|
||||
errors = new Array(errors);
|
||||
errors.each(function(error){
|
||||
this.tmp += "<li>"+error+"</li>";
|
||||
},this);
|
||||
this.tmp +="</ul>";
|
||||
this.warnBox.display(this.tmp);
|
||||
}
|
||||
}
|
||||
});
|
||||
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
||||
|
|
Loading…
Reference in a new issue