1 <script type="text/javascript">
3 $(document).ready(function(e){
4 $("#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 ) %]
40 [% FOREACH d IN debarments %]
43 <td>[% d.comment %]</td>
44 <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
45 [% IF ( CAN_user_borrowers )%]
47 <a id="remove_restriction" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% borrowernumber %]&borrower_debarment_id=[% d.borrower_debarment_id %]&action=del">
57 <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
58 [% IF ( CAN_user_borrowers )%]
59 <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
60 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
61 <input type="hidden" name="action" value="add" />
62 <fieldset class="rows" id="manual_restriction_form">
63 <legend>Add manual restriction</legend>
65 <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li>
66 <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" readonly="readonly" value="" class="datepicker" />
67 <a href='#' onclick="document.getElementById('expiration').value='';">Clear date</a></li>
69 <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset>