bug 4464: properly check if a subfield is populated if it is in a textarea
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / addbiblio.tmpl
index 6c4a2c4..3e41f04 100644 (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;
        }