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>
This commit is contained in:
Jonathan Druart 2021-10-11 15:46:05 +02:00
parent cd7641b2c8
commit 8943451f85
2 changed files with 2 additions and 3 deletions

View File

@ -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 %]

View File

@ -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;
}