Whe checking a subfield to be deleted, the code
$(this).val($(this).siblings("[name='subfield']").val());
is useless, the checkbox already contains the subfield code :
<input type="checkbox" ... name="disable_input" value="[% ite.subfield %]" />
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
row = row.replace("row","hint");
var editor = $(this).parent().find("[name='field_value']");
if ($(this).is(":checked")) {
- $(this).val($(this).siblings("[name='subfield']").val());
$(editor).prop('disabled', true);
$("#"+row).html(_("This subfield will be deleted"));
} else {