From 488c11d9a7446d710a40e73d9f6422e0ec98edff Mon Sep 17 00:00:00 2001 From: Julian Maurice <julian.maurice@biblibre.com> Date: Wed, 13 Apr 2016 20:27:49 +0200 Subject: [PATCH] Bug 16238: Use .prop() instead of .attr() for 'disabled' Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- koha-tmpl/intranet-tmpl/prog/en/js/ajax.js | 4 ++-- .../prog/en/js/marc_subfields_structure.js | 6 +++--- .../intranet-tmpl/prog/en/js/pages/preferences.js | 4 ++-- .../prog/en/modules/acqui/addorderiso2709.tt | 4 ++-- .../prog/en/modules/acqui/lateorders.tt | 4 ++-- .../prog/en/modules/admin/currency.tt | 4 ++-- .../prog/en/modules/admin/smart-rules.tt | 8 ++++---- .../prog/en/modules/admin/transport-cost-matrix.tt | 6 +++--- .../prog/en/modules/catalogue/itemsearch.tt | 6 +++--- .../prog/en/modules/cataloguing/additem.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++-- .../prog/en/modules/members/member-flags.tt | 6 +++--- .../prog/en/modules/members/member.tt | 10 ++++----- .../prog/en/modules/reports/catalogue_stats.tt | 12 +++++------ .../en/modules/reports/guided_reports_start.tt | 24 +++++++++++----------- .../prog/en/modules/serials/subscription-add.tt | 8 ++++---- .../intranet-tmpl/prog/en/modules/tags/review.tt | 12 +++++------ .../prog/en/modules/tools/batchMod-edit.tt | 4 ++-- .../prog/en/modules/tools/batch_delete_records.tt | 2 +- 19 files changed, 65 insertions(+), 65 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js index a8a9241..eebfa1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js @@ -34,7 +34,7 @@ KOHA.AJAX = { MarkRunning: function ( selector, text ) { text = text || _("Loading..."); $( selector ) - .attr( 'disabled', 'disabled' ) + .prop('disabled', true) .each( function () { var $spinner = $( '<span class="loading"></span>' ); var selector_type = this.localName; @@ -62,7 +62,7 @@ KOHA.AJAX = { }, MarkDone: function ( selector ) { $( selector ) - .removeAttr( 'disabled' ) + .prop('disabled', false) .each( function () { var selector_type = this.localName; if (selector_type === undefined) selector_type = this.nodeName; // IE only diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/marc_subfields_structure.js b/koha-tmpl/intranet-tmpl/prog/en/js/marc_subfields_structure.js index 2745564..197c04c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/marc_subfields_structure.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/marc_subfields_structure.js @@ -11,10 +11,10 @@ $(document).ready(function() { /* Function to enable/disable hidden values checkboxes when Flag is (de)selected */ function enable_cb(tab) { if ($("#hidden_flagged_" + tab).is(':checked')) { - $('.inclusive_' + tab).attr('disabled',true).prop('checked', false); + $('.inclusive_' + tab).prop('disabled', true).prop('checked', false); } else { - $('.inclusive_' + tab).removeAttr('disabled'); + $('.inclusive_' + tab).prop('disabled', false); } } @@ -140,4 +140,4 @@ function populateHiddenCheckboxes(tab) { enable_cb(tab); -} \ No newline at end of file +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js index 54286de..70365cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js @@ -54,7 +54,7 @@ $( document ).ready( function () { })); function mark_modified() { - $( this.form ).find( '.save-all' ).removeAttr( 'disabled' ); + $( this.form ).find( '.save-all' ).prop('disabled', false); $( this ).addClass( 'modified' ); var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' ); if ( !name_cell.find( '.modified-warning' ).length ) @@ -90,7 +90,7 @@ $( document ).ready( function () { $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false } ); - $( '.prefs-tab .save-all' ).attr( 'disabled', true ).click( function () { + $( '.prefs-tab .save-all' ).prop('disabled', true).click( function () { KOHA.Preferences.Save( this.form ); return false; } ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 722b725..ea4eb05 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -105,8 +105,8 @@ } ); $("input:checkbox").prop("checked", false); - $("div.biblio.unselected select").attr("disabled", false); - $("div.biblio.unselected input").attr("disabled", false); + $("div.biblio.unselected select").prop('disabled', false); + $("div.biblio.unselected input").prop('disabled', false); $("#checkAll").click(function(){ $("#Aform").checkCheckboxes(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 5bebcb6..9a62bb2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -17,9 +17,9 @@ function check_uncheck() { var all_nodes = $(late_orderst.fnGetNodes()); if ( $(all_nodes).find("input:checkbox[name=ordernumber]:checked").length > 0) { var booksellerid = $(all_nodes).find("input:checkbox[name=ordernumber]:checked:first").attr("data-booksellerid"); - $(all_nodes).find("input:checkbox[name=ordernumber][data-booksellerid!="+booksellerid+"]").attr('disabled', 'disabled'); + $(all_nodes).find("input:checkbox[name=ordernumber][data-booksellerid!="+booksellerid+"]").prop('disabled', true); } else { - $("input:checkbox[name=ordernumber]").removeAttr('disabled'); + $("input:checkbox[name=ordernumber]").prop('disabled', false); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt index 8617c9d..de465a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt @@ -14,11 +14,11 @@ function check_currency(val) { if ( val == 1.0 ) { - $("#active").removeAttr('disabled'); + $("#active").prop('disabled', false); $("#hint").html(""); } else { $("#active").prop('checked', false); - $("#active").attr('disabled','disabled'); + $("#active").prop('disabled', true); $("#hint").html(_("The active currency must have a rate of 1.0")); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 4dc4eb0..744cef8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -14,13 +14,13 @@ function clear_edit(){ var type = $(this).attr("type"); if (type != "button" && type != "submit" ) { $(this).val(""); - $(this).removeAttr("disabled"); + $(this).prop('disabled', false); } if ( type == "checkbox" ) { $(this).prop('checked', false); } }); - $(edit_row).find("select").removeAttr("disabled"); + $(edit_row).find("select").prop('disabled', false); $(edit_row).find("select option:first").attr("selected", "selected"); $(edit_row).find("td:last input[name='clear']").remove(); } @@ -90,8 +90,8 @@ $(document).ready(function() { } } }); - $("#default-circulation-rules tr:last td:eq(0) select").attr('disabled', 'disabled'); - $("#default-circulation-rules tr:last td:eq(1) select").attr('disabled', 'disabled'); + $("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true); + $("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true); return false; }); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt index 1a52a3f..f108dbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt @@ -16,9 +16,9 @@ function disable_transport_cost_chg(e, cost_id) { } function disable_transport_cost(cost_id, disable) { if (disable) { - $('#celldiv_'+cost_id).find('input[type=text]').attr("disabled","disabled").addClass('disabled-transfer'); + $('#celldiv_'+cost_id).find('input[type=text]').prop('disabled', true).addClass('disabled-transfer'); } else { - $('#celldiv_'+cost_id).find('input:disabled').removeAttr("disabled").removeClass('disabled-transfer'); + $('#celldiv_'+cost_id).find('input:disabled').prop('disabled', false).removeClass('disabled-transfer'); } } function enable_cost_input(cost_id) { @@ -35,7 +35,7 @@ function enable_cost_input(cost_id) { } function form_submit (f) { - $(f).find('input:disabled').removeAttr("disabled"); + $(f).find('input:disabled').prop('disabled', false); return true; } //]]> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 09e6b84..0ab63c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -197,7 +197,7 @@ copy.find('input,select').not('[type="hidden"]').each(function() { $(this).val(''); }); - copy.find('.form-field-conjunction').removeAttr('disabled'); + copy.find('.form-field-conjunction').prop('disabled', false); form_field.after(copy); copy.find('select.form-field-column').change(); } @@ -230,12 +230,12 @@ $('#results-wrapper').empty().html(results_heading + table); var params = []; - $form.find('select').not('[disabled]').find('option:selected').each(function () { + $form.find('select').not(':disabled').find('option:selected').each(function () { var name = $(this).parent('select').attr('name'); var value = $(this).val(); params.push({ 'name': name, 'value': value }); }); - $form.find('input[type="text"],input[type="hidden"]').not('[disabled]').each(function () { + $form.find('input[type="text"],input[type="hidden"]').not(':disabled').each(function () { params.push({ 'name': $(this).attr('name'), 'value': $(this).val() }); }); $form.find('input[type="radio"]:checked').each(function() { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 1de8960..b5d6203 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -72,7 +72,7 @@ function Check(f) { // So we use disabled instead. But disabled prevent values from being passed through the form at submit. // So we "un-disable" the elements just before submitting. // That's a bit clumsy, and if someone comes up with a better solution, feel free to improve that. - $("select[name=field_value]").removeAttr("disabled"); + $("select[name=field_value]").prop('disabled', false); return true; } else { var alertString2 = _("Form not submitted because of the following problem(s)"); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 4dd0cae..95465df 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -81,13 +81,13 @@ $(document).ready(function () { $("#barcode").addClass("alert"); $("#dropboxmode").show(); - $("#return_date_override_fields :input").attr("disabled", true); + $("#return_date_override_fields :input").prop('disabled', true); $("#return_date_override").datetimepicker("disable"); } else { $("#barcode").removeClass("alert"); $("#dropboxmode").hide(); - $("#return_date_override_fields :input").attr("disabled", false); + $("#return_date_override_fields :input").prop('disabled', false); $("#return_date_override").datetimepicker("enable"); } $("#barcode").focus(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt index aa5031f..51176db 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt @@ -17,7 +17,7 @@ $('input[name="flag"]').each(function() { if($(this).attr('id') != "flag-0"){ - $(this).attr('disabled', 'disabled'); + $(this).prop('disabled', true); $(this).prop('checked', false); } }); @@ -27,14 +27,14 @@ if($('input[id="flag-0"]:checked').length){ $('input[name="flag"]').each(function() { if($(this).attr('id') != "flag-0"){ - $(this).attr('disabled', 'disabled'); + $(this).prop('disabled', true); $(this).prop('checked', false); } }); } else { $('input[name="flag"]').each(function() { - $(this).removeAttr('disabled', 'disabled'); + $(this).prop('disabled', false); }); } }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index 43883f8..940478f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -11,7 +11,7 @@ <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { - $('#add_to_patron_list_submit').attr('disabled', 'disabled'); + $('#add_to_patron_list_submit').prop('disabled', true); $('#new_patron_list').hide(); $('#add_to_patron_list').change(function() { @@ -22,18 +22,18 @@ $(document).ready(function() { $('#new_patron_list').focus(); } else if ( value ) { $('#new_patron_list').hide(); - $('#add_to_patron_list_submit').removeAttr('disabled'); + $('#add_to_patron_list_submit').prop('disabled', false); } else { $('#new_patron_list').hide(); - $('#add_to_patron_list_submit').attr('disabled', 'disabled'); + $('#add_to_patron_list_submit').prop('disabled', true); } }); $('#new_patron_list').on('input', function() { if ( $('#new_patron_list').val() ) { - $('#add_to_patron_list_submit').removeAttr('disabled'); + $('#add_to_patron_list_submit').prop('disabled', false); } else { - $('#add_to_patron_list_submit').attr('disabled', 'disabled'); + $('#add_to_patron_list_submit').prop('disabled', true); } }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt index 8fddf05..7e04361 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt @@ -8,14 +8,14 @@ var Cellvalue = $("input[name='Cellvalue']:checked").val(); if(Cellvalue == "deleteditems") { $("#removeddatetr").show(); - $("input[value='deleteditems.timestamp']").attr('disabled', false); - $("#deldateFrom").attr('disabled', false); - $("#deldateTo").attr('disabled', false); + $("input[value='deleteditems.timestamp']").prop('disabled', false); + $("#deldateFrom").prop('disabled', false); + $("#deldateTo").prop('disabled', false); } else { $("#removeddatetr").hide(); - $("input[value='deleteditems.timestamp']").attr('disabled', true).prop('checked', false); - $("#deldateFrom").attr('disabled', true).val(''); - $("#deldateTo").attr('disabled', true).val(''); + $("input[value='deleteditems.timestamp']").prop('disabled', true).prop('checked', false); + $("#deldateFrom").prop('disabled', true).val(''); + $("#deldateTo").prop('disabled', true).val(''); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 9cec4f3..7549cad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -170,9 +170,9 @@ $(document).ready(function(){ [% IF (create || editsql || save) %] $("#select_group").change(function() { if($(this).prop('checked')) { - $("#group_input").attr('disabled', 'disabled'); - $("#groupdesc_input").attr('disabled', 'disabled'); - $("#group_select").attr('disabled', false); + $("#group_input").prop('disabled', true); + $("#groupdesc_input").prop('disabled', true); + $("#group_select").prop('disabled', false); if ($("#group_select").val().length > 0) { $("#select_subgroup").prop('checked', true); $("#select_subgroup").change(); @@ -184,9 +184,9 @@ $(document).ready(function(){ }); $("#create_group").change(function() { if($(this).prop('checked')) { - $("#group_input").attr('disabled', false); - $("#groupdesc_input").attr('disabled', false); - $("#group_select").attr('disabled', 'disabled'); + $("#group_input").prop('disabled', false); + $("#groupdesc_input").prop('disabled', false); + $("#group_select").prop('disabled', true); $("#create_subgroup").prop('checked', true).change(); $("#subgroup_select").hide(); $("#subgroup input[type='radio']").hide(); @@ -198,16 +198,16 @@ $(document).ready(function(){ }); $("#select_subgroup").change(function() { if($(this).prop('checked')) { - $("#subgroup_select").attr('disabled', false); - $("#subgroup_input").attr('disabled', 'disabled'); - $("#subgroupdesc_input").attr('disabled', 'disabled'); + $("#subgroup_select").prop('disabled', false); + $("#subgroup_input").prop('disabled', true); + $("#subgroupdesc_input").prop('disabled', true); } }); $("#create_subgroup").change(function() { if($(this).prop('checked')) { - $("#subgroup_input").attr('disabled', false); - $("#subgroupdesc_input").attr('disabled', false); - $("#subgroup_select").attr('disabled', 'disabled'); + $("#subgroup_input").prop('disabled', false); + $("#subgroupdesc_input").prop('disabled', false); + $("#subgroup_select").prop('disabled', true); } }); $("#select_group").change(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 29ae21a..a016439 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -103,9 +103,9 @@ function frequencyload(){ if ( globalfreqdata.unit && globalfreqdata.unit.length == 0 ) { var option = $("#subtype option[value='issues']"); $(option).attr('selected', 'selected'); - $("#subtype option[value!='issues']").attr('disabled', 'disabled') + $("#subtype option[value!='issues']").prop('disabled', true) } else { - $("#subtype option").attr('disabled', false) + $("#subtype option").prop('disabled', false) } } ) @@ -204,7 +204,7 @@ function modifyAdvancedPattern() { $(this).attr("readonly", false); }); $("#advancedpredictionpatternt select").each(function() { - $(this).attr("disabled", false); + $(this).prop('disabled', false); }); $("#restoreadvancedpatternbutton").show(); @@ -229,7 +229,7 @@ function restoreAdvancedPattern() { } }); $("#advancedpredictionpatternt select").each(function() { - $(this).attr("disabled", true); + $(this).prop('disabled', true); var id = $(this).attr('id'); $(this).val(globalnumpatterndata[id]); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index ba1908e..6ad6faf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -73,7 +73,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } }; var success_test_call = function() { - $('#test_button').removeAttr("disabled"); + $('#test_button').prop('disabled', false); $('#test_button').attr("value","test"); }; $(document).ready(function() { @@ -99,8 +99,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } "data": {ok: $(event.target).attr("title")}, "success": count_approve // success_approve }); - $(event.target).next(".rej").removeAttr("disabled").attr("value",_("Reject")).css("color","#000"); - $(event.target).attr( "value",_("Approved")).attr("disabled","disabled").css("color","#666"); + $(event.target).next(".rej").prop('disabled', false).attr("value",_("Reject")).css("color","#000"); + $(event.target).attr( "value",_("Approved")).prop('disabled', true).css("color","#666"); return false; // cancel submit } if ($(event.target).is('.rej')) { @@ -108,12 +108,12 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } "data": {rej: $(event.target).attr("title")}, "success": count_reject // success_reject }); - $(event.target).prev(".ok").removeAttr("disabled").attr("value",_("Approve")).css("color","#000"); - $(event.target).attr( "value",_("Rejected")).attr("disabled","disabled").css("color","#666"); + $(event.target).prev(".ok").prop('disabled', false).attr("value",_("Approve")).css("color","#000"); + $(event.target).attr( "value",_("Rejected")).prop('disabled', true).css("color","#666"); return false; // cancel submit } if ($(event.target).is('#test_button')) { - $(event.target).attr( "value",_("Testing...")).attr("disabled","disabled"); + $(event.target).attr( "value",_("Testing...")).prop('disabled', true); $.ajax({ "data": {test: $('#test').attr("value")}, "success": success_test_call // success_reject 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 362bf9a..a45d14a 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 @@ -24,10 +24,10 @@ $(document).ready(function(){ var subfield = $(this).next(); if ($(this).is(":checked")){ $(this).val($(this).siblings("[name='subfield']").val()); - $(subfield).attr('disabled',true); + $(subfield).prop('disabled', true); $("#"+row).html(_("This subfield will be deleted")); } else { - $(subfield).removeAttr('disabled'); + $(subfield).prop('disabled', false); $("#"+row).html(""); } }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt index d32839a..402ba01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt @@ -35,7 +35,7 @@ $(document).ready(function() { [% IF recordtype == 'biblio' %] $(".records input:checkbox[data-issues!='0']").each(function(){ $(this).attr('title', MSG_CANNOT_BE_DELETED) - $(this).attr('disabled', true); + $(this).prop('disabled', true); $(this).prop('checked', false); $(this).parents('tr').find('td').css('background-color', '#ffff99'); }); -- 2.7.0