4 [% PROCESS 'patron_restrictions.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description %]'[% ELSE %]New restriction[% END %][% END %]
8 [% IF op == 'delete_confirm' %]Confirm deletion of restriction '[% PROCESS restriction_type_description %]'[% END %] › Patron restrictions › Administration › Koha
10 [% INCLUDE 'doc-head-close.inc' %]
13 <body id="admin_restrictions" class="admin">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'patrons-admin-search.inc' %]
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
28 <a href="#" aria-current="page">
34 [% IF op == 'add_form' %]
36 <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
40 <a href="#" aria-current="page">
41 Modify restriction '[% PROCESS restriction_type_description %]'
46 <a href="#" aria-current="page">
53 [% IF op == 'delete_confirm' %]
55 <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
58 <a href="#" aria-current="page">
66 <div class="main container-fluid">
68 <div class="col-sm-10 col-sm-push-2">
71 [% FOR m IN messages %]
72 <div class="dialog [% m.type | html %]">
74 [% CASE 'add_success' %]
76 [% CASE 'update_success' %]
78 [% CASE 'duplicate_display_text' %]
79 Another restriction already has this label
80 [% CASE 'duplicate_code' %]
81 Another restriction already has this code
82 [% CASE 'delete_success' %]
84 [% CASE 'delete_default' %]
85 Cannot delete the default type
86 [% CASE 'delete_system' %]
87 Cannot delete a system type
94 [% IF op == 'add_form' %]
95 <form id="restriction_form" action="/cgi-bin/koha/admin/restrictions.pl" method="post">
96 <input type="hidden" name="op" value="add_validate" />
97 <input type="hidden" name="checked" value="0" />
99 <h1>Modify restriction [% PROCESS restriction_type_description %]</h1>
100 <input type="hidden" name="is_a_modif" value="1" />
102 <h1>New restriction</h1>
104 <fieldset class="rows">
108 <span class="label">Code: </span>[% restriction.code | html %]
109 <input type="hidden" name="code" value="[% restriction.code | html %]" />
112 <label for="display_text" class="required">Label: </label>
113 <input type="text" value="[% restriction.display_text | html %]" name="display_text" id="display_text" size="50" maxlength="50" class="required" required="required" />
114 <span class="required">Required</span>
118 <label for="code" class="required">Code: </label>
119 <input type="text" name="code" id="code" size="50" maxlength="50" class="required type_input " required="required" />
120 <span class="required">Required</span>
123 <label for="display_text" class="required">Label: </label>
124 <input type="text" name="display_text" id="display_text" size="50" maxlength="50" class="required" required="required" />
125 <span class="required">Required</span>
131 <fieldset class="action">
132 <input type="submit" value="Save" />
133 <a href="/cgi-bin/koha/admin/restrictions.pl" class="cancel">Cancel</a>
138 [% IF op == 'delete_confirm' %]
139 <form action="/cgi-bin/koha/admin/restrictions.pl" method="post">
142 Confirm restriction deletion
145 <p>Are you sure you want to delete "[% PROCESS restriction_type_description %]"?</p>
147 <fieldset class="action">
148 <input type="hidden" name="op" value="delete_confirmed" />
149 <input type="hidden" name="code" value="[% restriction.code | html %]" />
150 <input type="submit" value="Delete this restriction" />
151 <a class="cancel" href="/cgi-bin/koha/admin/restrictions.pl">Cancel</a>
157 [% IF op == 'list' %]
159 <div id="toolbar" class="btn-toolbar">
160 <a class="btn btn-default" id="newrestriction" href="/cgi-bin/koha/admin/restrictions.pl?op=add_form"><i class="fa fa-plus"></i> New restriction</a>
163 <h2>Patron restrictions</h2>
165 You Searched for [% searchfield | html %]</span>
167 [% IF restrictions %]
168 <table id="restriction_types">
171 <th scope="col">Code</th>
172 <th scope="col">Label</th>
173 <th scope="col">Default</th>
174 <th scope="col">Actions</th>
178 [% FOREACH restriction IN restrictions %]
181 [% restriction.code | html %]
184 [% PROCESS restriction_type_description %]
187 [% IF restriction.is_default %]Yes[% END %]
190 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/restrictions.pl?op=add_form&code=[% restriction.code | uri %]"><i class="fa fa-pencil"></i> Edit</a>
191 [% IF !restriction.is_system && !restriction.is_default %]
192 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/restrictions.pl?op=delete_confirm&code=[% restriction.code | uri %]"><i class="fa fa-trash"></i> Delete</a>
194 [% IF !restriction.is_system && !restriction.is_default %]
195 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/restrictions.pl?op=make_default&code=[% restriction.code | uri %]"><i class="fa fa-archive"></i> Make default</a>
203 <div class="dialog alert">No restrictions have been defined. <a href="/cgi-bin/koha/admin/restrictions.pl?op=add_form">Create a new restriction</a>.</div>
208 </div> <!-- /.col-sm-10.col-sm-push-2 -->
210 <div class="col-sm-2 col-sm-pull-10">
212 [% INCLUDE 'admin-menu.inc' %]
214 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
215 </div> <!-- /.row -->
217 [% MACRO jsinclude BLOCK %]
218 [% Asset.js("js/admin-menu.js") | $raw %]
219 [% INCLUDE 'datatables.inc' %]
220 [% INCLUDE 'columns_settings.inc' %]
222 var MSG_DUPLICATE_CODE = _("Restriction code is already in use");
223 var MSG_DUPLICATE_DISPLAY_TEXT = _("Label is already in use");
225 [% FOREACH ex IN existing %]
226 [% ex.code | $raw %]: '[% ex.display_text | $raw %]',
230 [% Asset.js("js/restrictiontypes.js") | $raw %]
232 [% INCLUDE 'intranet-bottom.inc' %]