Bug 21539: addorderiso2709.pl forces librarian to select a ccode and notforloan code...
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 10 Oct 2018 15:13:37 +0000 (11:13 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 24 Aug 2020 09:06:41 +0000 (11:06 +0200)
There is no reason that MarcItemFieldsToOrder should force librarians
to select a ccode and notforloan value for each item.
They are both optional fields.
As with location, the first value should be an empty 'none' option.

Test Plan:
1) Set up MarcItemFieldsToOrder, do *not* set mappings for ccode and notforloan
2) Add an order record to a basket that uses MarcItemFieldsToOrder
3) Note you must choose a ccode and nfl value
4) Apply this patch
5) Reload the page
6) Note you no longer have to select values for ccode and notforloan

Signed-off-by: Daniel Gaghan <daniel.gaghan@pueblolibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt

index ebe364e..1ae8d42 100644 (file)
                         </li>
 
                         <li><label for="ccode_item_[% item.item_id | html %]">ccode</label><select id="ccode_item_[% item.item_id | html %]" name="ccode_[% item.biblio_count | html %]">
+                        <option value=""> </option>
                         [% FOREACH ccodeloo IN ccodeloop %]
                             [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>[% ELSE %]<option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>[% END %]
                         [% END %]
                         </li>
 
                         <li><label for="notforloan_item_[% item.item_id | html %]">notforloan</label><select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% item.biblio_count | html %]">
+                        <option value=""> </option>
                         [% FOREACH n IN notforloanloop %]
                             [% IF n.code == item.notforloan %]
                                 <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>