3 [% PROCESS 'restriction-types.inc' %]
4 <div id="reldebarments" role="tabpanel" class="tab-pane">
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 %]
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 %]
33 <td>[% IF restriction.expiration %] [% restriction.expiration | $KohaDates %] [% ELSE %] <em>Indefinite</em> [% END %]</td>
34 <td>[% restriction.created | $KohaDates %]</td>
35 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
37 <a class="remove_restriction btn btn-default btn-xs" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% patron.borrowernumber | html %]&borrower_debarment_id=[% restriction.borrower_debarment_id | html %]&action=del">
38 <i class="fa fa-trash"></i> Remove
47 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
48 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
49 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
50 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
51 <input type="hidden" name="action" value="add" />
52 <fieldset class="rows" id="manual_restriction_form">
53 <legend>Add manual restriction</legend>
55 [% IF Koha.Preference('PatronRestrictionTypes') %]
57 <label for="debarred_type">Type:</label>
58 <select name="debarred_type">
59 [% FOREACH restriction_type IN restriction_types %]
60 [% IF !restriction_type.is_system %]
61 [% IF restriction_type.is_default %]
62 <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option>
64 <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option>
71 <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
73 <label for="rexpiration">Expiration:</label>
74 <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" />
77 <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>