[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
+[% USE Categories %]
[% USE ColumnsSettings %]
[% USE ItemTypes %]
[% USE Price %]
relatives_borrowernumbers.push("[% b %]");
[% END %]
-var MSG_ADD_MESSAGE = _("Add a new message");
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.");
}
});
- $(".clickable").click(function() {
- window.document.location = $(this).data('url');
- });
-
[% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
// listen submit to trigger qslip on empty checkout
$('#mainform').bind('submit',function() {
$("#onsite_checkout").click(function(){
toggle_onsite_checkout();
});
-
- var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, {
- "aoColumnDefs": [
- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
- ],
- "aaSorting": [ 2, "asc" ],
- "sDom": "t",
- "iDisplayLength": -1
- }));
- $(table).find('tbody tr').filter(':has(:radio:checked)').end().click(function(event) {
- $('#table_borrowers tbody tr').removeClass('selected');
- $(this).addClass('selected');
- if (event.target.type !== 'radio') {
- $(':radio', this).prop('checked', 'true')
- }
- });
-
});
//]]>
[% END %]
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
-<div style="display: none;" id="add_message_form">
-<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
-<fieldset id="borrower_messages" class="brief">
-<legend>Leave a message</legend>
- <ol>
- <li>
- <label for="message_type">Add a message for:</label>
- <select name="message_type" id="message_type">
- <option value="L">Staff - Internal note</option>
- <option value="B">OPAC - [% firstname %] [% surname %]</option>
- </select>
- </li>
- [% IF ( canned_bor_notes_loop ) %]
- <li>
- <label for="type">Predefined notes: </label>
- <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
- <option value="">Select note</option>
- [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
- <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
- [% END %]
- </select>
- </li>
- [% END %]
- <li>
- <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
- </li>
- </ol>
- <fieldset class="action">
- <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
- </fieldset>
-
- <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
- <input type="hidden" name="branchcode" value="[% branch %]" />
-</fieldset>
-</form>
-</div>
-
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
[% IF additional_materials %]
<div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate %] ([% alert.HIGHHOLDS.duration %] days).</div>
[% END %]
+[% IF ( nopermission ) %]
+ <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
+[% END %]
+
[% IF ( NEEDSCONFIRMATION ) %]
<div class="yui-g">
<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
[% END %]
+[% IF PREVISSUE %]
+ <li>This item has previously been checked out to this patron. Check out anyway?</li>
+[% END %]
+
[% IF BIBLIO_ALREADY_ISSUED %]
<li>
Patron has already checked out another item from this record.
[% 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-times-circle"></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=[% 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>
<li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
[% END %]
+ [% IF RETURN_IMPOSSIBLE %]
+ <li>This item must be returned to [% Branches.GetName( branch_to_return ) %].</li>
+ [% END %]
+
[% IF ( USERBLOCKEDWITHENDDATE ) %]
<li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
[% END %]
[% IF ( borrowers ) %]
[% INCLUDE 'patron-toolbar.inc' %]
-<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
- <input type="hidden" name="restoreduedatespec" />
-<fieldset id="circ_circulation_selectborrower" class="brief">
- <legend>Patron selection</legend>
-
-[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
- <input type="hidden" name="branch" value="[% branch %]" />
- <input type="hidden" name="printer" value="[% printer %]" />
- <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
- <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
-
- <table id="table_borrowers" class="table_borrowers">
- <thead>
- <tr>
- <th>Name</th>
- <th>Cardnumber</th>
- <th>Category</th>
- <th>Library</th>
- <th>Address</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH borrower IN borrowers %]
- <tr class="clickable" data-url="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">
- <td>[% borrower.surname %], [% borrower.firstname %]</td>
- <td>[% borrower.cardnumber %]</td>
- <td>[% borrower.categorycode %]</td>
- <td>[% borrower.branchcode %]</td>
- <td>[% borrower.address %]</td>
- </tr>
- [% END %]
- </tbody>
- </table>
+<fieldset id="circ_circulation_selectborrower">
+ [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %]
</fieldset>
-</form>
[% ELSE %]
<!-- BARCODE ENTRY -->
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="branch" value="[% branch %]" />
- <input type="hidden" name="printer" value="[% printer %]" />
<input type="hidden" name="print" value="maybe" />
<input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
[% IF ( CHARGES ) %]
[% END %]
[% IF ( debarredcomment ) %]
- with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
+ with the explanation: <br/><i>
+ [% IF debarredcomment.search('OVERDUES_PROCESS') %]
+ Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
+ [% ELSE %]
+ [% debarredcomment | html_line_break %]
+ [% END %]
[% END %]
<br/>
[% END %]</li>
[% END %]
</ul>
+ <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal">Add a new message</a>
</div>
</div>