From dbb3cccdb3d0f95b2918e36ff840a77b3ec1ce27 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 27 Oct 2020 14:01:47 -0400 Subject: [PATCH] Bug 26633: (QA follow-up) Action buttons should not remain grayed out if the same action is used multiple times in a row Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/admin/transfer_limits.tt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt index dbf812678b7..d652fb987e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt @@ -359,10 +359,12 @@ checkbox.attr('checked', false); $(`#spinner-${id}`).hide(); checkbox.show(); - $('.limit-action').removeClass('disabled'); - $('#value_selector').prop('disabled',false); } }, + complete: function() { + $('.limit-action').removeClass('disabled'); + $('#value_selector').prop('disabled',false); + }, error: function(xhr, status, error) { var errorMessage = xhr.status + ': ' + xhr.statusText alert('Error - ' + errorMessage); @@ -389,10 +391,12 @@ checkbox.attr('checked', true); $(`#spinner-${id}`).hide(); checkbox.show(); - $('.limit-action').removeClass('disabled'); - $('#value_selector').prop('disabled',false); } }, + complete: function() { + $('.limit-action').removeClass('disabled'); + $('#value_selector').prop('disabled',false); + }, error: function(xhr, status, error) { var errorMessage = xhr.status + ': ' + xhr.statusText alert('Error - ' + errorMessage); -- 2.29.2