+[% USE Asset %]
[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
[% USE ItemTypes %]
[% USE Price %]
[% USE AuthorisedValues %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% SET destination = "circ" %]
<title>Koha › Circulation
-[% IF borrowernumber and borrower%]
- › Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
+[% IF patron %]
+ › Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'calendar.inc' %]
-
-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-[% INCLUDE 'strings.inc' %]
-[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'columns_settings.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
-[% INCLUDE 'timepicker.inc' %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
-<script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
-<script type="text/javascript">
-//<![CDATA[
-/* Set some variable needed in circulation.js */
-var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
-var interface = "[% interface %]";
-var theme = "[% theme %]";
-var borrowernumber = "[% borrowernumber %]";
-var branchcode = "[% branch %]";
-var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
-var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
-var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
-var script = "circulation";
-var relatives_borrowernumbers = new Array();
-[% FOREACH b IN relatives_borrowernumbers %]
- relatives_borrowernumbers.push("[% b %]");
-[% END %]
-
-var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
-var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
-
-columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
-
-[% IF borrowernumber and borrower %]
- if($.cookie("holdfor") != [% borrowernumber %]){
- $.removeCookie("holdfor", { path: '/' });
- }
-[% ELSE %]
- $.removeCookie("holdfor", { path: '/' });
-[% END %]
-
-[% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
-
-// On-site checkout
-function toggle_onsite_checkout(){
- if ( $("#onsite_checkout").prop('checked') ) {
- $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
- [% IF !Koha.Preference('SpecifyDueDate') %]
- $("#duedatespec").datetimepicker('destroy');
- [% END %]
- } else {
- $("#duedatespec").datetimepicker({
- onClose: function(dateText, inst) {
- if (validate_date(dateText, inst) ) {
- $("#barcode").focus();
- }
- },
- hour: 23,
- minute: 59
- }).on("change", function(e, value) {
- if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
- });
- }
-}
-
-function Dopop(link) {
- var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
-}
-$(document).ready(function() {
- $('#mainform').on('submit',function() {
- if ($("#barcode") && $("#barcode").val()) {
- $('#barcode').on('keypress',function(event) {
- $('#barcodeSubmittedModal').modal();
- event.preventDefault(); }
- );
- }
- });
-
- if ( $('#clubs-tab').length ) {
- $('#clubs-tab-link').on('click', function() {
- $('#clubs-tab').text(_("Loading..."));
- $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
- });
- }
-
- [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
- // listen submit to trigger qslip on empty checkout
- $('#mainform').bind('submit',function() {
- if ($('#barcode').val() == '') {
- return printx_window( '[% CircAutoPrintQuickSlip %]' );
- }
- });
- [% END %]
- toggle_onsite_checkout();
- $("#onsite_checkout").click(function(){
- toggle_onsite_checkout();
- });
-
- $("#suspend_until").datepicker({
- onClose: function(dateText, inst) {
- validate_date(dateText, inst);
- },
- minDate: 1, // require that hold suspended until date is after today
- });
-
-});
-
-//]]>
-</script>
+[% Asset.css("css/datatables.css") %]
</head>
+
<body id="circ_circulation" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›
-[% IF borrowernumber and borrower %]
+[% IF patron %]
<a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> › [% INCLUDE 'patron-title.inc' %]
[% ELSE %]
<strong>Checkouts</strong>
<div class="yui-b">
[% END %]
-[% IF borrowernumber and borrower %]
+[% IF patron %]
[% INCLUDE 'members-toolbar.inc' %]
[% END %]
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
+[% IF autoswitched %]
+ <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
+[% END %]
+
[% IF additional_materials %]
<div id="materials" class="dialog message">Note about the accompanying materials: <br />
[% additional_materials %]
[% END %]
[% IF ( DEBT ) %]
- <li>The patron has a debt of [% DEBT %].</li>
+ <li>The patron has a debt of [% DEBT | $Price %].</li>
[% END %]
[% IF ( DEBT_GUARANTEES ) %]
[% END %]
[% IF PREVISSUE %]
- <li>Patron has previously checked out this title: <b>[% item.title %] [% IF item.author %] by [% item.author %][% END %]</b>. Check out anyway?</li>
+ <li>Patron has previously checked out this title: <b>[% biblio.title %] [% IF biblio.author %] by [% biblio.author %][% END %]</b>. Check out anyway?</li>
[% END %]
[% IF BIBLIO_ALREADY_ISSUED %]
[% END %]
</ul>
-[% IF HIGHHOLDS %]
-<script language="JavaScript" type="text/javascript">
-$(document).ready(function() {
- [% IF !override_high_holds %]
- $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
- if ('[% duedatespec %]' === '') {
- $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
- } else {
- $("input[name=restoreduedatespec]:hidden").val('[% duedatespec %]');
- }
- [% END %]
-
- $("#override_high_holds_tmp").on( 'change', function() {
- if ( this.checked ) {
- $("input[name=duedatespec]:hidden").val('');
- }
- });
-});
-</script>
-[% END %]
-
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
<input type="hidden" name="restoreduedatespec" />
[% END %]
<input type="hidden" name="barcode" value="[% barcode |html %]" />
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="hidden" name="issueconfirmed" value="1" />
<input type="hidden" name="override_high_holds" value="[% override_high_holds %]"/>
[% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
<button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
[% END %]
<input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
+ <input type="hidden" name="auto_renew" value="[% auto_renew %]" />
</form>
[% END %]
[% IF ( RESERVED ) %]
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
<input type="hidden" name="restoreduedatespec" />
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
- <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&biblionumber=[% itembiblionumber %]&op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
+ <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&biblionumber=[% itembiblionumber %]&itemnumber=[% item.itemnumber %]&op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
</form>
[% END %]
[% IF ( RESERVE_WAITING ) %]
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
<input type="hidden" name="restoreduedatespec" />
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
- <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&biblionumber=[% itembiblionumber %]&op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
+ <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&biblionumber=[% itembiblionumber %]&itemnumber=[% item.itemnumber %]&op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
</form>
[% END %]
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="restoreduedatespec" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
[% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
[% UNLESS noissues %]
- <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
+ <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% patron.borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
[% END %]
[% END %]
</div></div>
[% IF ( UNKNOWN_BARCODE ) %]
<li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
- [% IF ( fast_cataloging ) %]
- [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
- <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode |uri %]&circborrowernumber=[% borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]">Add record using fast cataloging</a>
- [% END %]
- [% END %]
- [% IF ( FALLBACK ) %]
- [% IF options %]
- <br />The following items were found by searching:
- [% FOREACH book IN options %]
- <br />
- <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
- [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
- <input type="hidden" name="restoreduedatespec" />
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
- <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
- <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
- <input type="hidden" name="branch" value="[% branch %]" />
- <input type="hidden" name="barcode" value="[% book.barcode %]" />
- <button type="submit" name="x"><i class="fa fa-check"></i> Check out [% book.barcode %]: [% book.title %]</button>
- </form>
- [% END %]
- [% ELSE %]
- <br />No items were found by searching.
- [% END %]
- [% END %]
+ <div>
+ [% IF ( FALLBACK ) %]
+ [% IF options %]
+ <button type="button" class="approve" data-toggle="modal" data-target="#itemSearchFallback"><i class="fa fa-search"></i> Show matching titles</button>
+ [% ELSE %]
+ <div>No items were found by searching.</div>
+ [% END %]
+ [% END %]
- </li>
+ [% IF ( fast_cataloging ) %]
+ [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
+ <a class="approve" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode |uri %]&circborrowernumber=[% patron.borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]"><i class="fa fa-plus"></i> Add record using fast cataloging</a>
+ [% END %]
+ [% END %]
+ </div>
+
+ </li>
[% END %]
[% IF ( NOT_FOR_LOAN ) %]
[% END %]
</div></div>
+
+ [% IF ( FALLBACK ) %]
+ [% IF options %]
+
+ <!-- Modal -->
+ <div class="modal" id="itemSearchFallback" tabindex="-1" role="dialog" aria-labelledby="itemSearchFallbackLabel">
+ <div class="modal-dialog modal-wide" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
+ <h3 id="itemSearchFallbackLabel"><h3>Barcode not found. The following items were found by searching:</h3>
+ </div>
+ <div class="modal-body">
+ <table class="table_borrowers">
+ [% FOREACH book IN options %]
+ <tr>
+ <td>
+ <a class="popup" target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber %]">[% book.title %]</a>
+ [% book.barcode %]
+ </td>
+ <td>
+ <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
+ [% IF (forceallow) %]
+ <input type="hidden" name="forceallow" value="1">
+ [% END %]
+ <input type="hidden" name="restoreduedatespec" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
+ <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
+ <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
+ <input type="hidden" name="branch" value="[% branch %]" />
+ <input type="hidden" name="barcode" value="[% book.barcode %]" />
+ <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
+ </form>
+ </td>
+ </tr>
+ [% END %]
+ </table>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ [% END %]
+ [% END %]
+
[% ELSE %]
[% IF (forceallow) %]
<div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
<!-- BARCODE ENTRY -->
-[% IF borrowernumber and borrower %]
+[% IF patron %]
<div class="yui-g">
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
</div> <!-- /.checkout-settings -->
- <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="hidden" name="branch" value="[% branch %]" />
<input type="hidden" name="print" value="maybe" />
<input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
[% IF ( CHARGES ) %]
<input type="hidden" name="charges" value="yes" />
- <input type="hidden" name="oldamount" value="[% amountold %]" />
[% END %]
</fieldset>
[% IF ( issue ) %]
[% IF ( has_modifications ) %]
<li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
- [% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
+ [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
<a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
[% END %]
</li>
[% IF ( warndeparture ) %]
<li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
- Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a>
+ Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% patron.borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a>
</li>
[% END %]
[% IF ( expired ) %]
<li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
- [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a>
+ [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% patron.borrowernumber %]&categorycode=[% categorycode %]">Edit Details</a>
</li>
[% END %]
[% END %]
<br/>
<a class="btn btn-default btn-sm" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
- [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
+ [% IF (noissues && patron && CAN_user_circulate_force_checkout) %]
<span class="override_debarment">
- <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
+ <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% patron.borrowernumber %]" class="btn btn-default btn-sm">Override restriction temporarily</a>
</span>
[% END %]
</li>
[% END %]
- [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
+ [% IF ( odues ) %]<li><span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a></li>
[% END %]
[% IF ( charges ) %]
- [% INCLUDE 'blocked-fines.inc'
- fines = chargesamount
- %]
+ [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
[% END %]
[% IF ( charges_guarantees ) %]
<li>
- <span class="circ-hlt">Fees & Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees %].
- [% IF ( charges_guarantees_is_blocker ) %]
+ <span class="circ-hlt">Fees & Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
+ [% IF noissues %]
<span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
[% END %]
</li>
[% IF ( credits ) %]
<li>
- <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
+ <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount | $Price %][% END %]
</li>
[% END %]
[% IF message.manager_id %]
( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
[% END %]
- <i>"[% message.message %]"</i>
+ <i>"[% message.message | html %]"</i>
</span>
[% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
<a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
<th>Pickup at</th>
<th>Expiration</th>
<th>Priority</th>
- <th>Delete?</th>
+ <th>Cancel?</th>
<th>Suspend?</th>
</tr>
</thead>
</fieldset>
</form>
- [% IF SuspendHoldsIntranet %]
+ [% IF Koha.Preference('SuspendHoldsIntranet') %]
<fieldset class="action">
<form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
<input type="hidden" name="from" value="circ" />
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="submit" value="Suspend all holds" />
- [% IF AutoResumeSuspendedHolds %]
+ [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
<label for="suspend_until">until</label>
- <input type="text" size="10" id="suspend_until" name="suspend_until datepicker" />
+ <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker"/>
<span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
[% END %]
</form>
<fieldset class="action">
<form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
<input type="hidden" name="from" value="circ" />
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
<input type="hidden" name="suspend" value="0" />
<input type="submit" value="Resume all suspended holds" />
</form>
[% ELSIF borrowernumber %]
<div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
-[% END %] <!-- borrowernumber and borrower-->
+[% END %]
</div></div>
[% END %]
[% IF Koha.Preference('CircSidebar') %]
[% UNLESS ( borrowers ) %]
- [% IF not( borrowernumber and borrower ) %]
+ [% IF not( borrowernumber and patron ) %]
<div class="yui-b noprint">
[% INCLUDE 'circ-nav.inc' %]
</div>
</div>
</div>
[% UNLESS ( borrowers ) %]
- [% IF borrowernumber and borrower %]
+ [% IF borrowernumber and patron %]
<div class="yui-b">
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'strings.inc' %]
+ [% INCLUDE 'calendar.inc' %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+ [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %]
+ [% INCLUDE 'timepicker.inc' %]
+ [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") %]
+ [% Asset.js("js/pages/circulation.js") %]
+ [% Asset.js("js/checkouts.js") %]
+ [% Asset.js("js/holds.js") %]
+ [% Asset.js("js/circ-patron-search-results.js") %]
+ <script type="text/javascript">
+ /* Set some variable needed in circulation.js */
+ var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
+ var interface = "[% interface %]";
+ var theme = "[% theme %]";
+ var borrowernumber = "[% patron.borrowernumber %]";
+ var branchcode = "[% branch %]";
+ var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
+ var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
+ var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
+ var script = "circulation";
+ var relatives_borrowernumbers = new Array();
+ [% FOREACH b IN relatives_borrowernumbers %]
+ relatives_borrowernumbers.push("[% b %]");
+ [% END %]
+
+ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
+ var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
+
+ /* Set some variables needed in members-menu.js */
+ var advsearch = "[% advsearch %]";
+ var dateformat = "[% dateformat %]";
+ var NorwegianPatronDBEnable = "[% NorwegianPatronDBEnable %]";
+ var CATCODE_MULTI = "[% CATCODE_MULTI %]";
+ var catcode = "[% catcode %]";
+ var destination = "[% destination %]";
+ var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers %]";
+
+ columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
+
+ [% IF borrowernumber and patron %]
+ if($.cookie("holdfor") != [% patron.borrowernumber %]){
+ $.removeCookie("holdfor", { path: '/' });
+ }
+ [% ELSE %]
+ $.removeCookie("holdfor", { path: '/' });
+ [% END %]
+
+ [% UNLESS ( patron.borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
+
+ // On-site checkout
+ function toggle_onsite_checkout(){
+ if ( $("#onsite_checkout").prop('checked') ) {
+ $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
+ [% IF !Koha.Preference('SpecifyDueDate') %]
+ $("#duedatespec").datetimepicker('destroy');
+ [% END %]
+ } else {
+ $("#duedatespec").datetimepicker({
+ onClose: function(dateText, inst) {
+ if (validate_date(dateText, inst) ) {
+ $("#barcode").focus();
+ }
+ },
+ hour: 23,
+ minute: 59
+ }).on("change", function(e, value) {
+ if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
+ });
+ }
+ }
+
+ function Dopop(link) {
+ var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
+ }
+ $(document).ready(function() {
+ $('#mainform').on('submit',function() {
+ if ($("#barcode") && $("#barcode").val()) {
+ $('#barcode').on('keypress',function(event) {
+ $('#barcodeSubmittedModal').modal();
+ event.preventDefault(); }
+ );
+ }
+ });
+
+ if ( $('#clubs-tab').length ) {
+ $('#clubs-tab-link').on('click', function() {
+ $('#clubs-tab').text(_("Loading..."));
+ $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber %]');
+ });
+ }
+
+ [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
+ // listen submit to trigger qslip on empty checkout
+ $('#mainform').bind('submit',function() {
+ if ($('#barcode').val() == '') {
+ return printx_window( '[% CircAutoPrintQuickSlip %]' );
+ }
+ });
+ [% END %]
+ toggle_onsite_checkout();
+ $("#onsite_checkout").click(function(){
+ toggle_onsite_checkout();
+ });
+
+ $("#suspend_until").datepicker({
+ onClose: function(dateText, inst) {
+ validate_date(dateText, inst);
+ },
+ minDate: 1, // require that hold suspended until date is after today
+ });
+
+ [% IF HIGHHOLDS %]
+ [% IF !override_high_holds %]
+ $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
+ if ('[% duedatespec %]' === '') {
+ $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
+ } else {
+ $("input[name=restoreduedatespec]:hidden").val('[% duedatespec %]');
+ }
+ [% END %]
+
+ $("#override_high_holds_tmp").on( 'change', function() {
+ if ( this.checked ) {
+ $("input[name=duedatespec]:hidden").val('');
+ }
+ });
+ [% END %]
+ });
+ </script>
+ [% Asset.js("js/members-menu.js") %]
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]