Bug 4805: Fixes multiple subscriptionid's being passed to serials-collection.
authorGarry Collum <gcollum@gmail.com>
Sun, 23 May 2010 23:55:26 +0000 (19:55 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Tue, 25 May 2010 19:46:14 +0000 (15:46 -0400)
This is a replacement patch for my previous patch.

This patch insures that only unique subscriptionids are defined in the serials-edit form.  Multiple ids are passed to serials-collection, but not multiple copies of the same id.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tmpl

index 774247f..dd73db9 100644 (file)
@@ -187,7 +187,10 @@ function CloneSubfield(index){
 </div>
 <!--/TMPL_IF -->
 
- <input type="hidden" name="op" value="serialchangestatus" />
+    <input type="hidden" name="op" value="serialchangestatus" />
+    <!--TMPL_LOOP Name="subscriptions"-->
+    <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
+    <!--/TMPL_LOOP -->
        <table>
        <tr>
                <th>Numbered</th>
@@ -204,7 +207,6 @@ function CloneSubfield(index){
     <!-- /TMPL_UNLESS -->
         <td>
             <input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->" />
-            <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
             <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
             <input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
             <input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
@@ -317,7 +319,6 @@ function CloneSubfield(index){
     <tr>
         <td>
             <input type="hidden" name="serialid" value="NEW" />
-            <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
             <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
             <input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
             <input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />