mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 14:33:49 +01:00
LSform.js : add method getInput() and use it in method getValue()
This commit is contained in:
parent
33cef8be28
commit
e58be43126
1 changed files with 12 additions and 5 deletions
|
@ -177,6 +177,17 @@ var LSform = new Class({
|
|||
},
|
||||
|
||||
getValue: function(fieldName) {
|
||||
var retVal = Array();
|
||||
var inputs = this.getInput(fieldName);
|
||||
inputs.each(function(el){
|
||||
if (el.value!="") {
|
||||
retVal.include(el.value);
|
||||
}
|
||||
},this);
|
||||
return retVal;
|
||||
},
|
||||
|
||||
getInput: function(fieldName) {
|
||||
var retVal = Array();
|
||||
var ul = $(fieldName);
|
||||
if ($type(ul)) {
|
||||
|
@ -190,11 +201,7 @@ var LSform = new Class({
|
|||
LSdebug(name);
|
||||
if (name) {
|
||||
if (name[1]==fieldName) {
|
||||
if ($type(el.value)) {
|
||||
if (el.value!="") {
|
||||
retVal.include(el.value);
|
||||
}
|
||||
}
|
||||
retVal.include(el);
|
||||
}
|
||||
}
|
||||
},this);
|
||||
|
|
Loading…
Reference in a new issue