diff --git a/horizon/static/horizon/js/horizon.forms.js b/horizon/static/horizon/js/horizon.forms.js index 8fff1d0f5d..66a0fc1677 100644 --- a/horizon/static/horizon/js/horizon.forms.js +++ b/horizon/static/horizon/js/horizon.forms.js @@ -74,7 +74,7 @@ horizon.forms = { if ($option.val() == "subnetpool") { $ipVersion.attr("disabled", "disabled"); } else { - $ipVersion.removeAttr("disabled"); + $ipVersion.prop("disabled", false); } }); }, @@ -198,7 +198,7 @@ horizon.forms.handle_submit = function (el) { // Remove disabled attribute on select fields before submit to get value // included in POST request. $this.find('select[disabled="disabled"]').each(function (i, field) { - $(field).removeAttr("disabled"); + $(field).prop("disabled", false); }); return true; }); @@ -379,7 +379,7 @@ horizon.forms.checkSpinnerValue = function($inputs) { var $up = $parent.find('.spinner-up'); var $down = $parent.find('.spinner-down'); - $parent.find('.themable-spinner-btn').removeAttr('disabled'); + $parent.find('.themable-spinner-btn').prop('disabled', false); if (val <= min) { // Disable if we've hit the min @@ -516,7 +516,7 @@ horizon.addInitFunction(horizon.forms.init = function () { //The required verification should be removed and recorded if ($input.attr('required') === 'required') { $input.data('savedRequired', 'required'); - $input.removeAttr('required'); + $input.prop('required', false); } } else { //If the input is a checkbox no need to replace html for label since it has another structure diff --git a/horizon/static/horizon/js/horizon.lists.js b/horizon/static/horizon/js/horizon.lists.js index 123dfdc307..3782be3272 100644 --- a/horizon/static/horizon/js/horizon.lists.js +++ b/horizon/static/horizon/js/horizon.lists.js @@ -25,7 +25,7 @@ horizon.lists = { var active_features = $("#selected_"+type+" > li").map(function () { return $(this).attr("name"); }); - $("#"+type+"ListId input:checkbox").removeAttr('checked'); + $("#"+type+"ListId input:checkbox").prop('checked', false); active_features.each(function (index, value) { $("#"+type+"ListId input:checkbox[value=" + value + "]") .prop('checked', true) diff --git a/horizon/static/horizon/js/horizon.membership.js b/horizon/static/horizon/js/horizon.membership.js index 7d453c5567..4789cc3ee6 100644 --- a/horizon/static/horizon/js/horizon.membership.js +++ b/horizon/static/horizon/js/horizon.membership.js @@ -318,7 +318,7 @@ horizon.membership = { } else { $('#no_' + filter).hide(); - $("input[id='" + filter + "']").removeAttr('disabled'); + $("input[id='" + filter + "']").prop('disabled', false); } }); }, @@ -446,7 +446,7 @@ horizon.membership = { }, 'testQuery': function (query, txt, span) { if ($(input).attr('id') === filter) { - $(input).prev().removeAttr('disabled'); + $(input).prev().prop('disabled', false); return query.test($(span).text()); } else { return true; diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js index b31a9bbf97..f8fff01fd7 100644 --- a/horizon/static/horizon/js/horizon.modals.js +++ b/horizon/static/horizon/js/horizon.modals.js @@ -121,7 +121,7 @@ horizon.modals.init_wizard = function () { }); // Temporarilly remove "disabled" attribute to get the values serialized - var disabled = $form.find('select[disabled="disabled"]').removeAttr("disabled"); + var disabled = $form.find('select[disabled="disabled"]').prop("disabled", false); // Send the data for validation. $.ajax({ @@ -321,7 +321,7 @@ horizon.addInitFunction(horizon.modals.init = function() { add_to_field_header = jqXHR.getResponseHeader("X-Horizon-Add-To-Field"), json_data, field_to_update; if (redirect_header === null) { - $('.ajax-modal, .dropdown-toggle').removeAttr("disabled"); + $('.ajax-modal, .dropdown-toggle').prop("disabled", false); } content_disposition = jqXHR.getResponseHeader("content-disposition"); @@ -361,7 +361,7 @@ horizon.addInitFunction(horizon.modals.init = function() { if (jqXHR.getResponseHeader('logout')) { location.href = jqXHR.getResponseHeader("X-Horizon-Location"); } else { - $('.ajax-modal, .dropdown-toggle').removeAttr("disabled"); + $('.ajax-modal, .dropdown-toggle').prop("disabled", false); $formElement.closest(".modal").modal("hide"); horizon.toast.add("danger", gettext("There was an error submitting the form. Please try again.")); } diff --git a/horizon/static/horizon/js/horizon.tables.js b/horizon/static/horizon/js/horizon.tables.js index 8783716429..7b8d996320 100644 --- a/horizon/static/horizon/js/horizon.tables.js +++ b/horizon/static/horizon/js/horizon.tables.js @@ -609,7 +609,7 @@ horizon.datatables.update_header_checkbox = function(table) { $multi_select_checkbox.prop('checked', false); $multi_select_checkbox.attr('disabled', true); } else { - $multi_select_checkbox.removeAttr('disabled'); + $multi_select_checkbox.prop('disabled', false); var not_checked = $checkboxes.not(':checked').length; $multi_select_checkbox.prop('checked', not_checked == 0); }