Browse Source

Bug 28445: Fix subfields to blank

The value of the checkbox was not correct

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Jonathan Druart 3 years ago
parent
commit
8943451f85
  1. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
  2. 3
      tools/batchMod.pl

2
koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc

@ -152,7 +152,7 @@
[% IF add_delete_checkbox %]
[% UNLESS ( subfield.mandatory ) %]
<input type="checkbox" id="row[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]" title="Check to delete subfield [% subfield.subfield | html %]" name="disable_input" value="[% subfield.subfield | html %]" />
<input type="checkbox" id="row[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]" title="Check to delete subfield [% subfield.subfield | html %]" name="disable_input" value="[% kohafield | html %]" />
[% ELSE %]
<span class="required">Required</span>
[% END %]

3
tools/batchMod.pl

@ -138,8 +138,7 @@ if ( $op eq "action" ) {
. encode_utf8($attr)
; # We need to deal correctly with encoding on subfield codes
if ( grep { $attr eq $_ } @subfields_to_blank ) {
if ( grep { $cgi_var_name eq $_ } @subfields_to_blank ) {
# Empty this column
$new_item_data->{$attr} = undef;
}

Loading…
Cancel
Save