bug 4464: properly check if a subfield is populated if it is in a textarea

Subfields whose contents are longer than 100 characters are represented on the
bib form using a <textarea> instead of a text <input>.  The check on whether
at least one subfield for a mandatory field is populated wasn't not
checking for <textarea> subfields.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Galen Charlton 2010-05-21 13:00:58 -04:00
parent 1dfc81a45e
commit 8e23cbc28f
1 changed files with 8 additions and 0 deletions

View File

@ -148,6 +148,14 @@ function AreMandatoriesNotOk(){
}
}
}
elemtextareas = elem.getElementsByTagName('textarea');
for(var j=0,len2=elemtextareas.length; j<len2; j++){
// this bit assumes that the only textareas in this context would be for subfields
if (elemtextareas[j].value) {
isempty = false;
}
}
}else{
isempty = false;
}