diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index d564c6e5c5..397abf7438 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -22,13 +22,13 @@ $(document).ready(function(){ $("input[name='disable_input']").click(function() { var row = $(this).attr("id"); row = row.replace("row","hint"); - var subfield = $(this).next(); - if ($(this).is(":checked")){ + var editor = $(this).parent().find("[name='field_value']"); + if ($(this).is(":checked")) { $(this).val($(this).siblings("[name='subfield']").val()); - $(subfield).prop('disabled', true); + $(editor).prop('disabled', true); $("#"+row).html(_("This subfield will be deleted")); } else { - $(subfield).prop('disabled', false); + $(editor).prop('disabled', false); $("#"+row).html(""); } });