[Koha-patches] [PATCH] cataloging/addbiblio have the fields that can fill themselves do it on save

Michael Hafen mdhafen at tech.washk12.org
Tue Sep 29 23:40:14 CEST 2009


My librarians complained that they had to push the save button twice to get
a few fields to fill themselves in.  So instead I change the javascript to call
the function twice.  The first call focuses those fields, which fills them.
The second call is to report the fields that can't fill themselves.
---
 .../prog/en/modules/cataloguing/addbiblio.tmpl     |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
index 3557cc2..81cdbe3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
@@ -43,6 +43,10 @@ function confirmnotdup(){
  */
 function Check(){
     var StrAlert = AreMandatoriesNotOk();
+    // AreMandatoriesNotOk call focus on all mandatory fields
+    // Some fields will fill themselves on focus.
+    // So call AreMandatoriesNotOk twice.
+    StrAlert = AreMandatoriesNotOk();
     if( ! StrAlert ){
         document.f.submit();
         return true;
-- 
1.6.0.4




More information about the Koha-patches mailing list