Bug 40395: Refactor: Move suspend modal to its own tt BLOCK
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
aea732cf72
commit
5437c7bdd8
|
|
@ -41,4 +41,36 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% BLOCK 'suspend-hold-modal' %]
|
||||
<div id="suspend-modal" class="modal" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form id="suspend-modal-form" class="form-inline">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title" id="suspend-modal-label">
|
||||
Suspend hold on
|
||||
<span id="suspend-modal-title"></span
|
||||
></h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
[% IF Koha.Preference('AutoResumeSuspendedHolds') %]
|
||||
<label for="suspend-modal-until">Suspend until: </label>
|
||||
<input name="suspend_until" id="suspend-modal-until" class="suspend-until flatpickr" data-flatpickr-futuredate="true" size="10" />
|
||||
|
||||
<p><a class="btn btn-link" id="suspend-modal-clear-date">Clear date to suspend indefinitely</a></p>
|
||||
[% ELSE %]
|
||||
<p>Are you sure you want to suspend indefinitely?</p>
|
||||
[% END %]
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="suspend-modal-submit" class="btn btn-primary" type="submit" name="submit">Suspend</button>
|
||||
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@
|
|||
</form>
|
||||
|
||||
[% PROCESS 'cancel-hold-modal' form_action = '/cgi-bin/koha/reserve/modrequest.pl' from_param = patronpage %]
|
||||
[% PROCESS 'suspend-hold-modal' %]
|
||||
|
||||
[% IF Koha.Preference('SuspendHoldsIntranet') %]
|
||||
<fieldset class="action">
|
||||
|
|
|
|||
|
|
@ -570,48 +570,6 @@ $(document).ready(function () {
|
|||
}
|
||||
}
|
||||
|
||||
$("body").append(
|
||||
"\
|
||||
<div id='suspend-modal' class='modal' role='dialog' aria-hidden='true'>\
|
||||
<div class='modal-dialog'>\
|
||||
<div class='modal-content'>\
|
||||
<form id='suspend-modal-form' class='form-inline'>\
|
||||
<div class='modal-header'>\
|
||||
<h1 class='modal-title' id='suspend-modal-label'>" +
|
||||
__("Suspend hold on") +
|
||||
" <i><span id='suspend-modal-title'></span></i></h1>\
|
||||
<button type='button' class='btn-close' data-bs-dismiss='modal' aria-label='Close'></button>\
|
||||
</div>\
|
||||
\
|
||||
<div class='modal-body'>\
|
||||
\
|
||||
<label for='suspend-modal-until'>" +
|
||||
__("Suspend until:") +
|
||||
"</label>\
|
||||
<input name='suspend_until' id='suspend-modal-until' class='suspend-until flatpickr' data-flatpickr-futuredate='true' size='10' />\
|
||||
\
|
||||
<p><a class='btn btn-link' id='suspend-modal-clear-date' >" +
|
||||
__("Clear date to suspend indefinitely") +
|
||||
"</a></p>\
|
||||
\
|
||||
</div>\
|
||||
\
|
||||
<div class='modal-footer'>\
|
||||
<button id='suspend-modal-submit' class='btn btn-primary' type='submit' name='submit'>" +
|
||||
__("Suspend") +
|
||||
"</button>\
|
||||
<button type='button' class='btn btn-default' data-bs-dismiss='modal'>" +
|
||||
__("Cancel") +
|
||||
"</button>\
|
||||
</div>\
|
||||
<div id='suspend-selected-container'></div>\
|
||||
</form>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
"
|
||||
);
|
||||
|
||||
$("#suspend-modal-clear-date").on("click", function () {
|
||||
$("#suspend-modal-until").flatpickr().clear();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue