Bug 26336: Disable 'Item processing' dropdown if no item

If there is no item to process and they have been ignored during the
stage step, we should not let the user modify the dropdown value

Test plan:
0 - Check the count of import_items
    SELECT COUNT(*) FROM import_items;
1 - Import a marc file with items , process the items
2 - Check the count of import items, it has increased
3 - Stage the file again, do not process items
4 - Count of import_items has not increased
5 - Manage the stage batch
Confirm that you cannot modify the "Item processing" value

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-09-01 15:47:27 +02:00
parent 01a7dc7067
commit cee2e630b4
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,8 @@
<select name="item_action" id="item_action">
[% IF item_action_ignore AND num_items == 0 %]
<select name="item_action" id="item_action" disabled="disabled">
[% ELSE %]
<select name="item_action" id="item_action">
[% END %]
[% IF ( item_action_always_add ) %]
<option value="always_add" selected="selected">
[% ELSE %]