From bea2c46c6555ea7609662c0c75cdc81a68cb98ff Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 24 Aug 2022 16:16:34 +0100 Subject: [PATCH] Bug 31095: Remove borrower_debarments and patron_restrictions includes This patch removes the aforementioned includes and drops the last remaining reference to them. We have replaces these includes with patron-restrictions-tab.inc and restriction-types.inc. --- .../prog/en/includes/borrower_debarments.inc | 82 ------------------- .../prog/en/includes/patron_restrictions.inc | 10 --- .../prog/en/modules/admin/restrictions.tt | 1 - 3 files changed, 93 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron_restrictions.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc deleted file mode 100644 index c70073db7a..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ /dev/null @@ -1,82 +0,0 @@ -[% USE raw %] -[% USE Koha %] -[% PROCESS 'patron_restrictions.inc' %] -
- [% IF ( not debarments.defined || debarments.size < 1 ) %] -

Patron is currently unrestricted.

- [% ELSE %] - - - - - - - - [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] - - [% END %] - - - - [% FOREACH d IN debarments %] - [% dtype = d.type %] - - - - - - [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] - - [% END %] - - [% END %] - -
TypeCommentExpirationCreated 
- [% PROCESS restriction_type_description restriction=restriction_types.$dtype %] - - [% IF d.comment.search('OVERDUES_PROCESS') %] - Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') | $raw %] - [% ELSE %] - [% d.comment | $raw %] - [% END %] - [% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %][% d.created | $KohaDates %] - - Remove - -
- [% END %] - [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] -

Add manual restriction

-
- - -
- Add manual restriction -
    - [% IF Koha.Preference('PatronRestrictionTypes') %] -
  1. - - -
  2. - [% END %] -
  3. -
  4. - - -
  5. -
-
Cancel
-
-
- [% END %] -
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_restrictions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_restrictions.inc deleted file mode 100644 index 7faa38b0aa..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_restrictions.inc +++ /dev/null @@ -1,10 +0,0 @@ -[%- BLOCK restriction_type_description -%] - [%- ddisplay = restriction.display_text -%] - [%- SWITCH ddisplay -%] - [%- CASE 'Manual' -%]Manual - [%- CASE 'Overdues' -%]Overdues - [%- CASE 'Suspension' -%]Suspension - [%- CASE 'Discharge' -%]Discharge - [%- CASE -%][% ddisplay | html %] - [%- END -%] -[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt index cc2be69146..cd1949aee5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt @@ -1,7 +1,6 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] -[% PROCESS 'patron_restrictions.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description %]'[% ELSE %]New restriction[% END %][% END %] -- 2.20.1