3 [% PROCESS 'patron_restrictions.inc' %]
4 <div id="reldebarments" role="tabpanel" class="tab-pane">
5 [% IF ( not debarments.defined || debarments.size < 1 ) %]
6 <p>Patron is currently unrestricted.</p>
15 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
21 [% FOREACH d IN debarments %]
25 [% PROCESS restriction_type_description restriction=restriction_types.$dtype %]
28 [% IF d.comment.search('OVERDUES_PROCESS') %]
29 <span>Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]</span>
31 [% d.comment | $raw %]
34 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <em>Indefinite</em> [% END %]</td>
35 <td>[% d.created | $KohaDates %]</td>
36 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
38 <a class="remove_restriction btn btn-default btn-xs" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% patron.borrowernumber | html %]&borrower_debarment_id=[% d.borrower_debarment_id | html %]&action=del">
39 <i class="fa fa-trash"></i> Remove
48 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
49 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
50 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
51 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
52 <input type="hidden" name="action" value="add" />
53 <fieldset class="rows" id="manual_restriction_form">
54 <legend>Add manual restriction</legend>
56 [% IF Koha.Preference('PatronRestrictionTypes') %]
58 <label for="debarred_type">Type:</label>
59 <select name="debarred_type">
60 [% FOREACH code IN restriction_types.keys %]
61 [% IF !restriction_types.$code.is_system %]
62 [% IF restriction_types.$code.is_default %]
63 <option value="[% code | html %]" selected>[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
65 <option value="[% code | html %]">[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
72 <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
74 <label for="rexpiration">Expiration:</label>
75 <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" />
78 <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>