@@ -, +, @@ should undebar automatically --- .../prog/en/includes/borrower_debarments.inc | 115 +++++++++++--------- .../prog/en/modules/members/memberentrygen.tt | 94 +++++++++------- 2 files changed, 118 insertions(+), 91 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc @@ -1,64 +1,73 @@
- [% UNLESS debarments %]

Patron is currently unrestricted.

[% END %] - - - - - - - - [% IF ( CAN_user_borrowers ) %] - - [% END %] - - - - - [% FOREACH d IN debarments %] + [% IF ( debarments.size < 1 ) %] +

Patron is currently unrestricted.

+ [% ELSE %] +
TypeCommentExpiration 
+ - - - - [% IF ( CAN_user_borrowers )%] - - [% END %] + + + + [% IF ( CAN_user_borrowers ) %] + + [% END %] - [% END %] - - - [% IF ( CAN_user_borrowers )%] - - - - - + + + [% FOREACH d IN debarments %] - - - - + + + + [% IF ( CAN_user_borrowers )%] + + [% END %] - - - [% END %] -
[% d.type %][% d.comment %][% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %] - - Remove - - TypeCommentExpiration 
MANUAL - - Clear Date - - - [% d.type %][% d.comment %][% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %] + + Remove + +
+ [% END %] + + + [% END %] +

Add manual restriction

+ [% IF ( CAN_user_borrowers )%] +
+ + +
+ Add manual restriction +
    +
  1. +
  2. + Clear date
  3. +
+
Cancel
+
+
+ [% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -39,6 +39,23 @@ [% END %] $("#dateofbirth").datepicker({ maxDate: "-1D" }); $("#entryform").preventDoubleFormSubmit(); + + var mrform = $("#manual_restriction_form"); + var mrlink = $("#add_manual_restriction"); + mrform.hide(); + mrlink.on("click",function(e){ + $(this).hide(); + mrform.show(); + e.preventDefault(); + }); + $("#cancel_manual_restriction").on("click",function(e){ + $('#debarred_expiration').val(''); + $('#add_debarment').prop('checked', false); + $('#debarred_comment').val(''); + mrlink.show(); + mrform.hide(); + e.preventDefault(); + }); }); function clear_entry(node) { @@ -1163,50 +1180,51 @@ - +
Patron restrictions - [% UNLESS debarments %]

Patron is currently unrestricted.

[% END %] - - - - - - - - - - - - - [% FOREACH d IN debarments %] + [% IF ( debarments.size < 1 ) %] +

Patron is currently unrestricted.

+ [% ELSE %] +
TypeCommentExpirationRemove?
+ - - - - + + + + - [% END %] - + + + + [% FOREACH d IN debarments %] + + + + + + + [% END %] + +
[% d.type %][% d.comment %][% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %] - - TypeCommentExpirationRemove?
[% d.type %][% d.comment %][% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %] + +
+ [% END %] +

Add manual restriction

+
+ + Add manual restriction +
    +
  1. +
  2. + Clear date
  3. - - - - Add new - - - - - - Clear date - - Clear new restriction - - - +
+

+ Cancel +

+
[% END %] --