3 <div id="reldebarments">
4 [% IF ( not debarments.defined || debarments.size < 1 ) %]
5 <p>Patron is currently unrestricted.</p>
14 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
20 [% FOREACH d IN debarments %]
24 [% ddisplay = restriction_types.$dtype.display_text %]
26 [% CASE 'Manual' %]Manual
27 [% CASE 'Overdues' %]Overdues
28 [% CASE 'Suspension' %]Suspension
29 [% CASE 'Discharge' %]Discharge
30 [% CASE %][% ddisplay | html %]
34 [% IF d.comment.search('OVERDUES_PROCESS') %]
35 <span>Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %]</span>
37 [% d.comment | $raw %]
40 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <em>Indefinite</em> [% END %]</td>
41 <td>[% d.created | $KohaDates %]</td>
42 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
44 <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">
45 <i class="fa fa-trash"></i> Remove
54 [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
55 <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
56 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
57 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
58 <input type="hidden" name="action" value="add" />
59 <fieldset class="rows" id="manual_restriction_form">
60 <legend>Add manual restriction</legend>
62 [% IF Koha.Preference('PatronRestrictionTypes') %]
64 <label for="debarred_type">Type:</label>
65 <select name="debarred_type">
66 [% FOREACH code IN restriction_types.keys %]
67 [% IF restriction_types.$code.can_be_added_manually %]
68 <option value="[% code | html %]">[% restriction_types.$code.display_text | html %]</option>
74 <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
76 <label for="rexpiration">Expiration:</label>
77 <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" />
80 <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>