Lines 4-11
Link Here
|
4 |
[% PROCESS 'restriction-types.inc' %] |
4 |
[% PROCESS 'restriction-types.inc' %] |
5 |
[% SET footerjs = 1 %] |
5 |
[% SET footerjs = 1 %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
<title>[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' › [% ELSE %]New restriction › [% END %][% END %] |
7 |
<title>[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction type '[% PROCESS restriction_type_description restriction_type=restriction %]' › [% ELSE %]New restriction type › [% END %][% END %] |
8 |
[% IF op == 'delete_confirm' %]Confirm deletion of restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' › [% END %]Patron restrictions › Administration › Koha |
8 |
[% IF op == 'delete_confirm' %]Confirm deletion of restriction type '[% PROCESS restriction_type_description restriction_type=restriction %]' › [% END %]Patron restriction types › Administration › Koha |
9 |
</title> |
9 |
</title> |
10 |
[% INCLUDE 'doc-head-close.inc' %] |
10 |
[% INCLUDE 'doc-head-close.inc' %] |
11 |
</head> |
11 |
</head> |
Lines 28-52
Link Here
|
28 |
[% IF op == 'list' %] |
28 |
[% IF op == 'list' %] |
29 |
<li> |
29 |
<li> |
30 |
<a href="#" aria-current="page"> |
30 |
<a href="#" aria-current="page"> |
31 |
Patron restrictions |
31 |
Patron restriction types |
32 |
</a> |
32 |
</a> |
33 |
</li> |
33 |
</li> |
34 |
[% END %] |
34 |
[% END %] |
35 |
|
35 |
|
36 |
[% IF op == 'add_form' %] |
36 |
[% IF op == 'add_form' %] |
37 |
<li> |
37 |
<li> |
38 |
<a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a> |
38 |
<a href="/cgi-bin/koha/admin/restrictions.pl">Patron restriction types</a> |
39 |
</li> |
39 |
</li> |
40 |
[% IF restriction %] |
40 |
[% IF restriction %] |
41 |
<li> |
41 |
<li> |
42 |
<a href="#" aria-current="page"> |
42 |
<a href="#" aria-current="page"> |
43 |
Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' |
43 |
Modify restriction type '[% PROCESS restriction_type_description restriction_type=restriction %]' |
44 |
</a> |
44 |
</a> |
45 |
</li> |
45 |
</li> |
46 |
[% ELSE %] |
46 |
[% ELSE %] |
47 |
<li> |
47 |
<li> |
48 |
<a href="#" aria-current="page"> |
48 |
<a href="#" aria-current="page"> |
49 |
New restriction |
49 |
New restriction type |
50 |
</a> |
50 |
</a> |
51 |
</li> |
51 |
</li> |
52 |
[% END %] |
52 |
[% END %] |
Lines 54-64
Link Here
|
54 |
|
54 |
|
55 |
[% IF op == 'delete_confirm' %] |
55 |
[% IF op == 'delete_confirm' %] |
56 |
<li> |
56 |
<li> |
57 |
<a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a> |
57 |
<a href="/cgi-bin/koha/admin/restrictions.pl">Patron restriction types</a> |
58 |
</li> |
58 |
</li> |
59 |
<li> |
59 |
<li> |
60 |
<a href="#" aria-current="page"> |
60 |
<a href="#" aria-current="page"> |
61 |
Delete restriction? |
61 |
Delete restriction type? |
62 |
</a> |
62 |
</a> |
63 |
</li> |
63 |
</li> |
64 |
[% END %] |
64 |
[% END %] |
Lines 76-94
Link Here
|
76 |
<div class="dialog [% m | html %]"> |
76 |
<div class="dialog [% m | html %]"> |
77 |
[% SWITCH m.code %] |
77 |
[% SWITCH m.code %] |
78 |
[% CASE 'add_success' %] |
78 |
[% CASE 'add_success' %] |
79 |
Type added |
79 |
Restriction type added |
80 |
[% CASE 'update_success' %] |
80 |
[% CASE 'update_success' %] |
81 |
Type updated |
81 |
Restriction type updated |
82 |
[% CASE 'duplicate_display_text' %] |
82 |
[% CASE 'duplicate_display_text' %] |
83 |
Another restriction already has this label |
83 |
Another restriction type already has this label |
84 |
[% CASE 'duplicate_code' %] |
84 |
[% CASE 'duplicate_code' %] |
85 |
Another restriction already has this code |
85 |
Another restriction type already has this code |
86 |
[% CASE 'delete_success' %] |
86 |
[% CASE 'delete_success' %] |
87 |
Type deleted |
87 |
Restriction type deleted |
88 |
[% CASE 'delete_default' %] |
88 |
[% CASE 'delete_default' %] |
89 |
Cannot delete the default type |
89 |
Cannot delete the default restriction type |
90 |
[% CASE 'delete_system' %] |
90 |
[% CASE 'delete_system' %] |
91 |
Cannot delete a system type |
91 |
Cannot delete a system restriction type |
92 |
[% CASE %] |
92 |
[% CASE %] |
93 |
[% m.code | html %] |
93 |
[% m.code | html %] |
94 |
[% END %] |
94 |
[% END %] |
Lines 100-109
Link Here
|
100 |
<input type="hidden" name="op" value="add_validate" /> |
100 |
<input type="hidden" name="op" value="add_validate" /> |
101 |
<input type="hidden" name="checked" value="0" /> |
101 |
<input type="hidden" name="checked" value="0" /> |
102 |
[% IF restriction %] |
102 |
[% IF restriction %] |
103 |
<h1>Modify restriction [% PROCESS restriction_type_description restriction_type=restriction %]</h1> |
103 |
<h1>Modify restriction type [% PROCESS restriction_type_description restriction_type=restriction %]</h1> |
104 |
<input type="hidden" name="is_a_modif" value="1" /> |
104 |
<input type="hidden" name="is_a_modif" value="1" /> |
105 |
[% ELSE %] |
105 |
[% ELSE %] |
106 |
<h1>New restriction</h1> |
106 |
<h1>New restriction type</h1> |
107 |
[% END %] |
107 |
[% END %] |
108 |
<fieldset class="rows"> |
108 |
<fieldset class="rows"> |
109 |
<ol> |
109 |
<ol> |
Lines 143-149
Link Here
|
143 |
<form action="/cgi-bin/koha/admin/restrictions.pl" method="post"> |
143 |
<form action="/cgi-bin/koha/admin/restrictions.pl" method="post"> |
144 |
<fieldset> |
144 |
<fieldset> |
145 |
<legend> |
145 |
<legend> |
146 |
Confirm restriction deletion |
146 |
Confirm restriction type deletion |
147 |
</legend> |
147 |
</legend> |
148 |
|
148 |
|
149 |
<p>Are you sure you want to delete "[% PROCESS restriction_type_description restriction_type=restriction %]"?</p> |
149 |
<p>Are you sure you want to delete "[% PROCESS restriction_type_description restriction_type=restriction %]"?</p> |
Lines 151-157
Link Here
|
151 |
<fieldset class="action"> |
151 |
<fieldset class="action"> |
152 |
<input type="hidden" name="op" value="delete_confirmed" /> |
152 |
<input type="hidden" name="op" value="delete_confirmed" /> |
153 |
<input type="hidden" name="code" value="[% restriction.code | html %]" /> |
153 |
<input type="hidden" name="code" value="[% restriction.code | html %]" /> |
154 |
<input type="submit" class="btn btn-primary" value="Delete this restriction" /> |
154 |
<input type="submit" class="btn btn-primary" value="Delete this restriction type" /> |
155 |
<a class="cancel" href="/cgi-bin/koha/admin/restrictions.pl">Cancel</a> |
155 |
<a class="cancel" href="/cgi-bin/koha/admin/restrictions.pl">Cancel</a> |
156 |
</fieldset> |
156 |
</fieldset> |
157 |
</fieldset> |
157 |
</fieldset> |
Lines 161-170
Link Here
|
161 |
[% IF op == 'list' %] |
161 |
[% IF op == 'list' %] |
162 |
|
162 |
|
163 |
<div id="toolbar" class="btn-toolbar"> |
163 |
<div id="toolbar" class="btn-toolbar"> |
164 |
<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> |
164 |
<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 type</a> |
165 |
</div> |
165 |
</div> |
166 |
|
166 |
|
167 |
<h1>Patron restrictions</h1> |
167 |
<h1>Patron restriction types</h1> |
168 |
|
168 |
|
169 |
[% IF restrictions %] |
169 |
[% IF restrictions %] |
170 |
<div class="page-section"> |
170 |
<div class="page-section"> |
Lines 204-210
Link Here
|
204 |
</table> |
204 |
</table> |
205 |
</div><!-- /.page-section --> |
205 |
</div><!-- /.page-section --> |
206 |
[% ELSE %] |
206 |
[% ELSE %] |
207 |
<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> |
207 |
<div class="dialog alert">No restriction types have been defined. <a href="/cgi-bin/koha/admin/restrictions.pl?op=add_form">Create a new restriction type</a>.</div> |
208 |
[% END %] |
208 |
[% END %] |
209 |
[% END %] |
209 |
[% END %] |
210 |
|
210 |
|
Lines 223-230
Link Here
|
223 |
[% INCLUDE 'datatables.inc' %] |
223 |
[% INCLUDE 'datatables.inc' %] |
224 |
[% INCLUDE 'columns_settings.inc' %] |
224 |
[% INCLUDE 'columns_settings.inc' %] |
225 |
<script> |
225 |
<script> |
226 |
var MSG_DUPLICATE_CODE = _("Restriction code is already in use"); |
226 |
var MSG_DUPLICATE_CODE = _("Restriction type code is already in use"); |
227 |
var MSG_DUPLICATE_DISPLAY_TEXT = _("Label is already in use"); |
227 |
var MSG_DUPLICATE_DISPLAY_TEXT = _("Restriction type label is already in use"); |
228 |
var existing = { |
228 |
var existing = { |
229 |
[% FOREACH ex IN existing %] |
229 |
[% FOREACH ex IN existing %] |
230 |
[% ex.code | $raw %]: '[% ex.display_text | $raw %]', |
230 |
[% ex.code | $raw %]: '[% ex.display_text | $raw %]', |
231 |
- |
|
|