Bug 12927: Problems with item information tab on acq order from staged page
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tue, 16 Sep 2014 17:48:50 +0000 (14:48 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 16 Oct 2014 15:51:13 +0000 (12:51 -0300)
This patch fixes a regression introduced (by me)
on Bug 12673.

I adds the code needed to display properly all fields

To test:
1) Check that 'AcqCreateItem' syspref is set to 'placing an order'
2) Satage a file with some items
3) Go to a Vendor, create a basket, clic add from staged file, select your file
4) On 'Item information' tab fields are displayed wrong

5) Apply the patch

6) Reload, display must now be fixed

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt

index 0974e92..cf03b7c 100644 (file)
                                             <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="1" />
                                         <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
                                         <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />