Bug 12673: Followup - fix display in serials-edit
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wed, 13 Aug 2014 16:40:11 +0000 (13:40 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 14 Aug 2014 23:18:52 +0000 (20:18 -0300)
This patch fix the display of items information
following changes on previous patch.

To test:
1. Go to serials
2. Add a subscription
3. Receive an issue
4. Change status to Arrived
Item information display correct labels,
but no pulldowns, that's the bug
5. Apply the patch
6. Reload page, change to Arrived again,
this time pulldowns must be right

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.

koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt

index 373b70c..67a2ead 100644 (file)
@@ -264,7 +264,19 @@ $(document).ready(function() {
                 [% ELSE %]
                     <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
                 [% END %]
+                [% IF ( iteminformatio.marc_value.type == 'select' ) %]
+                  <select name="field_value" size="1">
+                  [% FOREACH value IN iteminformatio.marc_value.values %]
+                    [% IF ( value == iteminformatio.marc_value.default ) %]
+                      <option value="[% value %]" selected="selected">[% iteminformatio.marc_value.labels.$value %]</option>
+                    [% ELSE %]
+                      <option value="[% value %]">[% iteminformatio.marc_value.labels.$value %]</option>
+                    [% END %]
+                  [% END %]
+                  </select>
+                [% ELSE %]
                 [% iteminformatio.marc_value %]
+                [% END %]
                 <input type="hidden" name="itemid" value="[% item.itemid %]" />
                 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
                 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />