5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description %]'[% ELSE %]New restriction[% END %][% END %]
7 [% IF op == 'delete_confirm' %]Confirm deletion of restriction '[% PROCESS restriction_type_description %]'[% END %] › Patron restrictions › Administration › Koha
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="admin_restrictions" class="admin">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'patrons-admin-search.inc' %]
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
27 <a href="#" aria-current="page">
33 [% IF op == 'add_form' %]
35 <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
39 <a href="#" aria-current="page">
40 Modify restriction '[% PROCESS restriction_type_description %]'
45 <a href="#" aria-current="page">
52 [% IF op == 'delete_confirm' %]
54 <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
57 <a href="#" aria-current="page">
65 <div class="main container-fluid">
67 <div class="col-sm-10 col-sm-push-2">
70 [% FOR m IN messages %]
71 <div class="dialog [% m.type | html %]">
73 [% CASE 'add_success' %]
75 [% CASE 'update_success' %]
77 [% CASE 'duplicate_display_text' %]
78 Another restriction already has this label
79 [% CASE 'duplicate_code' %]
80 Another restriction already has this code
81 [% CASE 'delete_success' %]
83 [% CASE 'delete_default' %]
84 Cannot delete the default type
85 [% CASE 'delete_system' %]
86 Cannot delete a system type
93 [% IF op == 'add_form' %]
94 <form id="restriction_form" action="/cgi-bin/koha/admin/restrictions.pl" method="post">
95 <input type="hidden" name="op" value="add_validate" />
96 <input type="hidden" name="checked" value="0" />
98 <h1>Modify restriction [% PROCESS restriction_type_description %]</h1>
99 <input type="hidden" name="is_a_modif" value="1" />
101 <h1>New restriction</h1>
103 <fieldset class="rows">
107 <span class="label">Code: </span>[% restriction.code | html %]
108 <input type="hidden" name="code" value="[% restriction.code | html %]" />
111 <label for="display_text" class="required">Label: </label>
112 <input type="text" value="[% restriction.display_text | html %]" name="display_text" id="display_text" size="50" maxlength="50" class="required" required="required" />
113 <span class="required">Required</span>
117 <label for="code" class="required">Code: </label>
118 <input type="text" name="code" id="code" size="50" maxlength="50" class="required type_input " required="required" />
119 <span class="required">Required</span>
122 <label for="display_text" class="required">Label: </label>
123 <input type="text" name="display_text" id="display_text" size="50" maxlength="50" class="required" required="required" />
124 <span class="required">Required</span>
130 <fieldset class="action">
131 <input type="submit" class="btn btn-primary" value="Save" />
132 <a href="/cgi-bin/koha/admin/restrictions.pl" class="cancel">Cancel</a>
137 [% IF op == 'delete_confirm' %]
138 <form action="/cgi-bin/koha/admin/restrictions.pl" method="post">
141 Confirm restriction deletion
144 <p>Are you sure you want to delete "[% PROCESS restriction_type_description %]"?</p>
146 <fieldset class="action">
147 <input type="hidden" name="op" value="delete_confirmed" />
148 <input type="hidden" name="code" value="[% restriction.code | html %]" />
149 <input type="submit" class="btn btn-primary" value="Delete this restriction" />
150 <a class="cancel" href="/cgi-bin/koha/admin/restrictions.pl">Cancel</a>
156 [% IF op == 'list' %]
158 <div id="toolbar" class="btn-toolbar">
159 <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>
162 <h1>Patron restrictions</h1>
164 You Searched for [% searchfield | html %]</span>
166 [% IF restrictions %]
167 <div class="page-section">
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>
202 </div><!-- /.page-section -->
204 <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>
209 </div> <!-- /.col-sm-10.col-sm-push-2 -->
211 <div class="col-sm-2 col-sm-pull-10">
213 [% INCLUDE 'admin-menu.inc' %]
215 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
216 </div> <!-- /.row -->
218 [% MACRO jsinclude BLOCK %]
219 [% Asset.js("js/admin-menu.js") | $raw %]
220 [% INCLUDE 'datatables.inc' %]
221 [% INCLUDE 'columns_settings.inc' %]
223 var MSG_DUPLICATE_CODE = _("Restriction code is already in use");
224 var MSG_DUPLICATE_DISPLAY_TEXT = _("Label is already in use");
226 [% FOREACH ex IN existing %]
227 [% ex.code | $raw %]: '[% ex.display_text | $raw %]',
231 [% Asset.js("js/restrictiontypes.js") | $raw %]
233 [% INCLUDE 'intranet-bottom.inc' %]