Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Emily Lamancusa 2024-04-25 14:58:31 -04:00 committed by Katrin Fischer
parent e9356afd9f
commit 7b4b3f7487
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -1451,7 +1451,7 @@
<div class="modal-body">
<p>Are you sure you want to cancel this hold?</p>
<div id="cancel_hold_alert" class="alert alert-danger"></div>
<div id="cancel_hold_alert" class="alert alert-danger" style="display:none;"></div>
<fieldset class="action">
[% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
[% IF hold_cancellation.count %]
@ -1889,6 +1889,7 @@
$(this).prop('checked', !count);
$('.cancel_selected_holds').html(MSG_CANCEL_SELECTED.format($('.holds_table .select_hold:checked').length));
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length));
$('#cancel_hold_alert').show();
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id'));
});
@ -1898,6 +1899,7 @@
$('.select_hold_all', table).prop('checked', !count);
$('.cancel_selected_holds').html(MSG_CANCEL_SELECTED.format($('.holds_table .select_hold:checked').length));
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length));
$('#cancel_hold_alert').show();
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id'));
});