3 [% PROCESS 'restriction-types.inc' %]
5 [% IF ( patron.restrictions.count == 0 ) %]
6 <p>Patron is currently unrestricted.</p>
15 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
21 [% FOREACH restriction IN patron.restrictions %]
22 [% IF restriction.is_expired %]<tr class="expired">[% ELSE %]<tr>[% END %]
24 [% PROCESS restriction_type_description restriction_type=restriction.type %]
27 [% IF restriction.comment.search('OVERDUES_PROCESS') %]
28 <span>Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]</span>
30 [% restriction.comment | $raw %]
34 [% IF restriction.expiration %]
35 [% restriction.expiration | $KohaDates %]
36 [% IF restriction.is_expired %](<span>expired</span>)[% END %]
41 <td>[% restriction.created | $KohaDates %]</td>
42 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
44 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl">
45 [% INCLUDE 'csrf-token.inc' %]
46 <input type="hidden" name="op" value="cud-del" />
47 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | uri %]" />
48 <input type="hidden" name="borrower_debarment_id" value="[% restriction.borrower_debarment_id | uri %]" />
49 <button type="submit" class="remove_restriction btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Remove</button>
58 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
59 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
60 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
61 [% INCLUDE 'csrf-token.inc' %]
62 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
63 <input type="hidden" name="op" value="cud-add" />
64 <fieldset class="rows" id="manual_restriction_form">
65 <legend>Add manual restriction</legend>
67 [% IF Koha.Preference('PatronRestrictionTypes') %]
69 <label for="debarred_type">Type:</label>
70 <select name="debarred_type">
71 [% FOREACH restriction_type IN restriction_types %]
72 [% IF !restriction_type.is_system %]
73 [% IF restriction_type.is_default %]
74 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
76 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
83 <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
85 <label for="rexpiration">Expiration:</label>
86 <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" />
89 <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>