1 <script type="text/javascript">
3 $(document).ready(function(e){
4 $("div#reldebarments .remove_restriction").on("click",function(){
5 return confirm(_("Remove restriction?"));
7 var mrform = $("#manual_restriction_form");
8 var mrlink = $("#add_manual_restriction");
10 mrlink.on("click",function(e){
15 $("#cancel_manual_restriction").on("click",function(e){
24 <div id="reldebarments">
25 [% IF ( debarments.size < 1 ) %]
26 <p>Patron is currently unrestricted.</p>
34 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
40 [% FOREACH d IN debarments %]
48 [% CASE 'SUSPENSION' %]
52 <td>[% d.comment %]</td>
53 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
54 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
56 <a class="remove_restriction" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% borrowernumber %]&borrower_debarment_id=[% d.borrower_debarment_id %]&action=del">
66 [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
67 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
68 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
69 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
70 <input type="hidden" name="action" value="add" />
71 <fieldset class="rows" id="manual_restriction_form">
72 <legend>Add manual restriction</legend>
74 <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
75 <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" readonly="readonly" value="" class="datepicker" />
76 <a href='#' onclick="document.getElementById('expiration').value='';">Clear date</a></li>
78 <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>