5 [% USE AuthorisedValues %]
6 [% USE NoticeTemplates %]
8 <div id="toolbar" class="btn-toolbar">
9 [% IF CAN_user_borrowers_edit_borrowers %]
10 <a id="editpatron" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=[% patron.borrowernumber | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
13 [% IF CAN_user_borrowers_edit_borrowers %]
14 [% IF patron.is_adult AND Koha.Preference("borrowerRelationship") %]
15 <a id="addchild" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=add_form&guarantor_id=[% patron.borrowernumber | html %]"><i class="fa fa-plus"></i> Add guarantee</a>
17 <a id="changepassword" class="btn btn-default" href="/cgi-bin/koha/members/member-password.pl?member=[% patron.borrowernumber | html %]"><i class="fa fa-lock"></i> Change password</a>
18 <a id="duplicate" class="btn btn-default" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% patron.borrowernumber | html %]"><i class="fa fa-copy"></i> Duplicate</a>
21 [% IF CAN_user_circulate_circulate_remaining_permissions %]
22 <div class="btn-group">
23 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-print"></i> Print <span class="caret"></span></button>
24 <ul class="dropdown-menu">
25 <li><a class="printslip" data-code="printsummary" href="#">Print summary</a></li>
26 <li><a class="printslip" data-code="issueslip" href="#">Print slip</a></li>
27 <li><a class="printslip" data-code="issueqslip" href="#">Print quick slip</a></li>
28 [% IF patron.account_balance != 0 %]
29 <li><a id="printfineslip" target="_blank" href="/cgi-bin/koha/members/printnotice.pl?notice=ACCOUNTS_SUMMARY&borrowernumber=[% patron.borrowernumber | uri %]">Print account balance</a></li>
31 [% IF patron.has_overdues %]
32 <li><a id="print_overdues" href="#">Print overdues</a></li>
34 [% IF patron.privacy < 2 %] [%# 2 is the privacy rule "Never" (Delete my history immediately) %]
35 <li><a class="printslip" data-code="checkinslip" href="#">Print checkin slip</a></li>
37 [% FOREACH notice IN Notices.GetTemplates( 'patron_slip' ) %]
38 <li><a class="printslip" data-code="[% notice.code | html %]" href="#">Print [% notice.name | html %]</a></li>
44 [% IF ( CAN_user_reserveforothers ) %]
45 <a id="searchtohold" class="btn btn-default" href="#"><i class="fa fa-search"></i> Search to hold</a>
48 [% IF CAN_user_borrowers_edit_borrowers %]
49 <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal" class="btn btn-default"><i class="fa-solid fa-comment"></i> Add message</a>
52 [% IF Koha.Preference('CurbsidePickup') %]
53 <a id="curbsidePickupLabel" href="/cgi-bin/koha/circ/curbside_pickups.pl?op=find-patron&borrowernumber=[% patron.borrowernumber | html %]" class="btn btn-default"><i class="fa-solid fa-rotate"></i> Schedule pickup</a>
56 [% IF CAN_user_borrowers_edit_borrowers %]
57 <div class="btn-group">
58 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
59 <ul class="dropdown-menu dropdown-menu-right">
60 [% IF CAN_user_borrowers_edit_borrowers %]
61 <li><a id="renewpatron" href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | html %]&destination=[% destination | html %]&reregistration=y">Renew patron</a></li>
63 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to renew patrons" id="renewpatron" href="#">Renew patron</a></li>
65 [% IF ( CAN_user_permissions ) %]
66 <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% patron.borrowernumber | html %]">Set permissions</a></li>
68 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to set permissions" id="patronflags" href="#">Set permissions</a></li>
71 [% IF ( Koha.Preference('TwoFactorAuthentication') == 'enforced' || Koha.Preference('TwoFactorAuthentication') == 'enabled' ) && logged_in_user.borrowernumber == patron.borrowernumber %]
72 <li><a id="twofa" href="/cgi-bin/koha/members/two_factor_auth.pl">Manage two-factor authentication</a></li>
75 [% IF CAN_user_borrowers_edit_borrowers && useDischarge %]
76 <li><a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% patron.borrowernumber | uri %]">Discharge</a></li>
79 [% IF Koha.Preference('RESTOAuth2ClientCredentials') %]
80 [% IF CAN_user_superlibrarian OR loggedinusernumber == patron.borrowernumber %]
81 <li><a id="apikeys" href="/cgi-bin/koha/members/apikeys.pl?patron_id=[% patron.borrowernumber | html %]">Manage API keys</a></li>
83 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to manage API keys" id="apikeys" href="#">Manage API keys</a></li>
87 [% IF CAN_user_borrowers_edit_borrowers %]
88 <li><a id="sendwelcome" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber | uri %]&op=send_welcome">Send welcome notice</a></li>
91 [% IF CAN_user_borrowers_edit_borrowers && patron.category.effective_reset_password %]
92 <li><a id="resetpassword" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber | uri %]&op=send_password_reset">Send password reset</a></li>
95 [% IF CAN_user_borrowers_delete_borrowers %]
96 [% IF ( patron.protected == 1 ) %]
97 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is protected" id="deletepatron" href="#">Delete</a></li>
99 <li><a id="deletepatron" href="#">Delete</a></li>
102 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to delete patrons" id="deletepatron" href="#">Delete</a></li>
104 [% SET adult_categories = Categories.scalar.all(category_type => 'A') %]
105 [% IF adult_categories.count > 0 %]
106 [% IF patron.is_child %]
107 <li><a id="updatechild" href="#">Update child to adult patron</a></li>
109 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is an adult" id="updatechild" href="#">Update child to adult patron</a></li>
112 [% IF Koha.Preference('intranetreadinghistory') %]
113 [%IF ( privacy == 2 ) %]
114 <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Not allowed by patron's privacy settings" id="exportbarcodes" href="#">Export today's checked in barcodes</a></li>
116 <li><a id="exportcheckins" href="#">Export today's checked in barcodes</a></li>
125 <div id="add_message_form" class="modal" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true">
126 <div class="modal-dialog">
127 <div class="modal-content">
128 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
129 [% INCLUDE 'csrf-token.inc' %]
130 <input type="hidden" name="op" value="cud-add_message">
131 <div class="modal-header">
132 <h3>Leave a message</h3>
134 <div class="modal-body">
135 <div class="form-group">
136 <label for="message_type">Add a message for:</label>
137 <select name="message_type" id="message_type">
138 <option value="L">Staff - Internal note</option>
139 <option value="B">OPAC - [% patron.firstname | html %] [% patron.surname | html %]</option>
140 [% IF CAN_user_borrowers_send_messages_to_borrowers %]
141 <option value="E">Email - email addresses of patron</option>
145 [% bor_notes = AuthorisedValues.Get( 'BOR_NOTES' ) %]
147 <div class="form-group">
148 <label for="select_patron_messages">Predefined notes: </label>
149 <select name="type" id="select_patron_messages">
150 <option value="">Select note</option>
151 [% FOREACH bor_note IN bor_notes %]
152 <option value="[% bor_note.lib | html %]">[% bor_note.lib | html %]</option>
158 [% patron_letters = NoticeTemplates.GetByModule( 'add_message' ) %]
159 [% IF patron_letters %]
160 <div class="form-group">
161 <label for="select_patron_notice" style="display:none;">Patron notice: </label>
162 <select name="select_patron_notice" id="select_patron_notice" style="display:none;">
163 <option value="">Select notice</option>
164 [% FOREACH letter IN patron_letters %]
165 <option value="[% letter.code | html %]">[% letter.name | html %]</option>
171 <div class="form-group">
172 <fieldset class="rows">
174 <li id="subject_form" style="display: none;">
175 <label for="borrower_subject">Subject:</label>
176 <input type="text" size="60" name="borrower_subject" id="borrower_subject"/>
179 <label for="borrower_message" style="display: none;">Body:</label>
180 <textarea cols="65" rows="5" name="borrower_message" id="borrower_message" ></textarea>
185 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
186 <input type="hidden" name="batch" value="[% batch | html %]" />
187 <input type="hidden" name="branchcode" value="[% Branches.GetLoggedInBranchcode | html %]" />
189 <div class="modal-footer">
190 <button class="btn btn-default approve" type="submit"><i class="fa fa-check"></i> Save</button>
191 <button class="btn btn-default deny cancel" href="#" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Cancel</button>