Bug 40679: Fix display of cancellation reason dropdown

To test:
1. Have some holds
2. Go to reserve/request.pl?biblionumber=x for your biblionumber
3. Change at least one hold priority to 'del'
4. Notice the toolbar above the table with Update Hold, Cancel selected, Cancellation reason now looks wonky.
5. APPLY PATCH
6. Try again, the display of the toolbar should be better.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd1adddb35)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Lucas Gass 2025-08-20 17:36:54 +00:00 committed by Paul Derscheid
parent 6ebf2b7e45
commit cf828af0a0
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 9 additions and 5 deletions

View File

@ -113,6 +113,10 @@
.rank-request {
width: 50px;
}
#cancellation-reason-div {
display: flex;
align-items: center;
}
</style>
[% END %]
</head>
@ -1231,7 +1235,7 @@
<div class="btn-group">
<button class="btn cancel_selected_holds" data-bulk="true"></button>
</div>
<fieldset id="cancellation-reason-fieldset" class="action" style="display:none">
<div id="cancellation-reason-div" style="display:none">
[% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
[% IF hold_cancellation.count %]
<label for="cancellation-reason">Cancellation reason: </label>
@ -1242,7 +1246,7 @@
[% END %]
</select>
[% END %]
</fieldset>
</div>
</div>
<div class="page-section">
[% FOREACH biblioloo IN biblioloop %]
@ -1440,12 +1444,12 @@
$.fn.select2.defaults.set("dropdownAutoWidth", true );
$(document).ready(function() {
$('#cancellation-reason-fieldset').hide();
$('#cancellation-reason-div').hide();
$('.rank-request').on('change', function() {
if ( $(".rank-request option:selected[value='del']").length ) {
$('#cancellation-reason-fieldset').show();
$('#cancellation-reason-div').show();
} else {
$('#cancellation-reason-fieldset').hide();
$('#cancellation-reason-div').hide();
}
});