#1491: Subscription add does not check for all required fields
authorPaul POULAIN <paul@koha-fr.org>
Tue, 30 Oct 2007 18:02:40 +0000 (13:02 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 31 Oct 2007 10:35:51 +0000 (05:35 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl

index fda6e9c..b925a2f 100644 (file)
@@ -758,7 +758,11 @@ function Find_ISSN(f)
 
 
 function Check(f) {
-    if (f.startdate.value.length != 0 && f.sublength.value > 0) {
+    if (f.aqbooksellerid.value.length==0) {
+        alert(_('You must choose a bookseller'));
+    } else if (f.biblionumber.value.length==0) {
+        alert(_('You must choose or create a biblio'));
+    } else if(f.startdate.value.length != 0 && f.sublength.value > 0) {
         if (f.irreg_check.value == 1) {
             document.f.submit();
         } else {
@@ -769,7 +773,7 @@ function Check(f) {
             }
         }
     } else {
-        alert(_('Fields marked with * are mandatory'));
+        alert(_('You must choose a start date and a subscription length'));
     }
     return false;
 }
@@ -817,11 +821,11 @@ window.onload = irregular_order();
             <span class="label">Librarian: </span>            <!-- TMPL_VAR name="loggedinusername" -->
         </li>
         <li>
-            <label for="aqbooksellerid">Supplier:</label>
+            <label for="aqbooksellerid">Supplier: (*)</label>
             <input type="text" name="aqbooksellerid" id="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size="8" /> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled="disabled" readonly="readonly" />) <div class="inputnote"><a href="#" onclick="FindAcqui(f)">Search for a Supplier</a></div>
         </li>
         <li>
-            <label for="biblionumber">Biblio</label>
+            <label for="biblionumber">Biblio: (*)</label>
             
                 <input type="text" name="biblionumber" id="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="8" /> 
                 (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled="disabled" readonly="readonly" />)