Bug 18706 - Remove useless Javascript
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 31 May 2017 14:10:41 +0000 (16:10 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 9 Jun 2017 15:21:05 +0000 (12:21 -0300)
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>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt

index e774e95..2b746ab 100644 (file)
@@ -24,7 +24,6 @@ $(document).ready(function(){
       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 {