@ -8,7 +8,7 @@
[% PROCESS 'member-main-address-style.inc' %]
[% PROCESS 'member-alt-address-style.inc' %]
[% PROCESS 'member-alt-contact-style.inc' %]
[% PROCESS 'patron_ restrictions.inc' %]
[% PROCESS 'restriction-type s.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
@ -1409,7 +1409,7 @@ legend:hover {
<fieldset class="rows" id="memberentry_restrictions">
<legend id="restrictions_lgd">Patron restrictions</legend>
[% IF ( debarments ) %]
[% IF ( patron.restrictions.count ) %]
<table>
<thead>
<tr>
@ -1423,28 +1423,27 @@ legend:hover {
</tr>
</thead>
<tbody>
[% FOREACH d IN debarments %]
[% dtype = d.type %]
[% FOREACH restriction IN patron.restrictions %]
<tr>
<td>[% restriction_types.$dtype.display_text | html %]</td>
<td>[% PROCESS restriction_type_description restriction_type=restriction.type %]</td>
<td>
[% IF d .comment.search('OVERDUES_PROCESS') %]
Restriction added by overdues process [% d .comment.remove('OVERDUES_PROCESS ') | $raw %]
[% IF restriction .comment.search('OVERDUES_PROCESS') %]
Restriction added by overdues process [% restriction .comment.remove('OVERDUES_PROCESS ') | $raw %]
[% ELSE %]
[% d .comment | $raw %]
[% restriction .comment | $raw %]
[% END %]
</td>
<td>
[% IF d .expiration %]
[% d .expiration | $KohaDates %]
[% IF restriction .expiration %]
[% restriction .expiration | $KohaDates %]
[% ELSE %]
<em>Indefinite</em>
[% END %]
</td>
<td>[% d .created | $KohaDates %]</td>
<td>[% restriction .created | $KohaDates %]</td>
[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
<td>
<input type="checkbox" id="debarment_[% d.borrower_debarment_id | html %]" name="remove_debarment" value="[% d .borrower_debarment_id | html %]" />
<input type="checkbox" id="debarment_[% restriction.borrower_debarment_id | html %]" name="remove_debarment" value="[% restriction .borrower_debarment_id | html %]" />
</td>
[% END %]
</tr>
@ -1453,10 +1452,10 @@ legend:hover {
</table>
[% ELSE %]
<p>Patron is currently unrestricted.</p>
[% END # /IF ( debarments ) %]
[% END # /IF ( patron.restrictions.count ) %]
[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %]
<p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
<p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p>
<fieldset id="manual_restriction_form">
<input type="hidden" id="add_debarment" name="add_debarment" value="0" />
<legend id="manual_restriction_lgd">Add manual restriction</legend>
@ -1465,12 +1464,12 @@ legend:hover {
<li>
<label for="debarred_type">Type:</label>
<select name="debarred_type">
[% FOREACH code IN restriction_types.key s %]
[% IF !restriction_types.$code .is_system %]
[% IF restriction_types.$code .is_default %]
<option value="[% code | html %]" selected>[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
[% FOREACH restriction_type IN restriction_type s %]
[% IF !restriction_type.is_system %]
[% IF restriction_type.is_default %]
<option value="[% code | html %]" selected>[% PROCESS restriction_type_description %]</option>
[% ELSE %]
<option value="[% code | html %]">[% PROCESS restriction_type_description restriction=restriction_types.$code %]</option>
<option value="[% code | html %]">[% PROCESS restriction_type_description %]</option>
[% END %]
[% END %]
[% END %]