@@ -, +, @@ - Log in to the OPAC as a user who has holds. - On the "Your summary" page open the "Holds" tab. - In the list of holds, click the "Suspend" button. - The modal should appear and look correct. - Test the "Suspend until" field: Clicking in the form field should trigger the datepicker. It should be positioned correctly under the form field. - Confirm that the datepicker populates the field. - Submit the suspension and confirm that the hold is suspended. - Click the "Cancel" button for a hold. Confirm that the confirmation dialog appears correctly. --- .../bootstrap/en/includes/holds-table.inc | 50 ++++++++++++---------- .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 16 ++++++- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 2 +- 3 files changed, 44 insertions(+), 24 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -148,28 +148,34 @@ Suspend [% # hold suspend modal form %] [% ELSE %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -967,7 +967,21 @@ }); [% END %] - $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future + $(".suspend-until").datepicker({ + beforeShow: function(input, inst) { + // https://stackoverflow.com/questions/662220/how-to-change-the-pop-up-position-of-the-jquery-datepicker-control#answer-10598178 + var calendar = inst.dpDiv; + setTimeout(function() { + calendar.position({ + my: 'left top', + at: 'left bottom', + collision: 'none', + of: input + }); + }, 1); + }, + minDate: 1 + }); if ( $('#opac-user-clubs').length ) { $('#opac-user-clubs-tab-link').on('click', function() { --- a/koha-tmpl/opac-tmpl/bootstrap/js/global.js +++ a/koha-tmpl/opac-tmpl/bootstrap/js/global.js @@ -90,7 +90,7 @@ function confirmModal(message, title, yes_label, no_label, callback) { \ \ \ \ --