[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% PROCESS 'restriction-types.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' › [% ELSE %]New restriction › [% END %][% END %]
[% IF op == 'delete_confirm' %]Confirm deletion of restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' › [% END %]Patron restrictions › Administration › Koha
[% INCLUDE 'doc-head-close.inc' %]
[% WRAPPER 'header.inc' %]
[% INCLUDE 'prefs-admin-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
Administration
[% END %]
[% IF op == 'list' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Patron restrictions
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
Patron restrictions
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% IF restriction %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Modify restriction '[% PROCESS restriction_type_description %]'
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
New restriction
[% END %]
[% END %]
[% END %]
[% IF op == 'delete_confirm' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Delete restriction?
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
[% FOR m IN messages %]
[% SWITCH m.code %]
[% CASE 'add_success' %]
Restriction type added
[% CASE 'update_success' %]
Restriction type updated
[% CASE 'duplicate_display_text' %]
Another restriction already has this label
[% CASE 'duplicate_code' %]
Another restriction already has this code
[% CASE 'delete_success' %]
Restriction type deleted
[% CASE 'delete_default' %]
Cannot delete the default restriction type
[% CASE 'delete_system' %]
Cannot delete a system restriction type
[% CASE %]
[% m.code | html %]
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% END %]
[% IF op == 'delete_confirm' %]
[% END %]
[% IF op == 'list' %]
[% PROCESS restriction_type_description restriction_type=restriction %]
[% IF restriction.is_default %]Yes[% END %]
Edit
[% IF !restriction.is_system && !restriction.is_default %]
Delete
[% END %]
[% IF !restriction.is_system && !restriction.is_default %]
Make default
[% END %]