mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +01:00
LSform: display fields errors in same order as triggered
This commit is contained in:
parent
0af81bf0a3
commit
096b1d3301
1 changed files with 5 additions and 2 deletions
|
@ -388,13 +388,16 @@ var LSform = new Class({
|
||||||
if ($type(ul)) {
|
if ($type(ul)) {
|
||||||
if ($type(errors) != 'array')
|
if ($type(errors) != 'array')
|
||||||
errors = new Array(errors);
|
errors = new Array(errors);
|
||||||
|
var ctx = new Object();
|
||||||
|
ctx.injectAfter = ul.getParent();
|
||||||
errors.each(function(txt){
|
errors.each(function(txt){
|
||||||
var dd = new Element('dd');
|
var dd = new Element('dd');
|
||||||
dd.addClass('LSform');
|
dd.addClass('LSform');
|
||||||
dd.addClass('LSform-errors');
|
dd.addClass('LSform-errors');
|
||||||
dd.set('html',txt);
|
dd.set('html',txt);
|
||||||
dd.injectAfter(this.getParent());
|
dd.injectAfter(this.injectAfter);
|
||||||
},ul);
|
this.injectAfter = dd;
|
||||||
|
}, ctx);
|
||||||
|
|
||||||
var dt = ul.getParent('dd.LSform').getPrevious('dt');
|
var dt = ul.getParent('dd.LSform').getPrevious('dt');
|
||||||
if ($type(dt)) {
|
if ($type(dt)) {
|
||||||
|
|
Loading…
Reference in a new issue