mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +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,7 +27,7 @@ var LSform = new Class({
|
||||||
this.params={};
|
this.params={};
|
||||||
}
|
}
|
||||||
this._ajaxSubmit=this.params.ajaxSubmit;
|
this._ajaxSubmit=this.params.ajaxSubmit;
|
||||||
if ($type(this.params.warnings)) {
|
|
||||||
this.warnBox = new LSinfosBox({
|
this.warnBox = new LSinfosBox({
|
||||||
name: 'LSformWarnBox',
|
name: 'LSformWarnBox',
|
||||||
fxDuration: 600,
|
fxDuration: 600,
|
||||||
|
@ -35,6 +35,7 @@ var LSform = new Class({
|
||||||
autoClose: 0
|
autoClose: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ($type(this.params.warnings)) {
|
||||||
this.warnTxt = '<ul>';
|
this.warnTxt = '<ul>';
|
||||||
this.params.warnings.each(function(w) {
|
this.params.warnings.each(function(w) {
|
||||||
this.warnTxt +='<li>'+w+'</li>';
|
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() {
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
||||||
|
|
Loading…
Reference in a new issue