|
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 23-51
Link Here
|
| 23 |
|
23 |
|
| 24 |
[% IF op == 'list' %] |
24 |
[% IF op == 'list' %] |
| 25 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
25 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 26 |
<span>Patron restrictions</span> |
26 |
<span>Patron restriction types</span> |
| 27 |
[% END %] |
27 |
[% END %] |
| 28 |
[% ELSE %] |
28 |
[% ELSE %] |
| 29 |
[% WRAPPER breadcrumb_item %] |
29 |
[% WRAPPER breadcrumb_item %] |
| 30 |
<a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a> |
30 |
<a href="/cgi-bin/koha/admin/restrictions.pl">Patron restriction types</a> |
| 31 |
[% END %] |
31 |
[% END %] |
| 32 |
[% END %] |
32 |
[% END %] |
| 33 |
|
33 |
|
| 34 |
[% IF op == 'add_form' %] |
34 |
[% IF op == 'add_form' %] |
| 35 |
[% IF restriction %] |
35 |
[% IF restriction %] |
| 36 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
36 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 37 |
<span>Modify restriction '[% PROCESS restriction_type_description %]'</span> |
37 |
<span>Modify restriction type'[% PROCESS restriction_type_description %]'</span> |
| 38 |
[% END %] |
38 |
[% END %] |
| 39 |
[% ELSE %] |
39 |
[% ELSE %] |
| 40 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
40 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 41 |
<span>New restriction</span> |
41 |
<span>New restriction type</span> |
| 42 |
[% END %] |
42 |
[% END %] |
| 43 |
[% END %] |
43 |
[% END %] |
| 44 |
[% END %] |
44 |
[% END %] |
| 45 |
|
45 |
|
| 46 |
[% IF op == 'delete_confirm' %] |
46 |
[% IF op == 'delete_confirm' %] |
| 47 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
47 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
| 48 |
<span>Delete restriction?</span> |
48 |
<span>Delete restriction type?</span> |
| 49 |
[% END %] |
49 |
[% END %] |
| 50 |
[% END %] |
50 |
[% END %] |
| 51 |
[% END #/ WRAPPER breadcrumbs %] |
51 |
[% END #/ WRAPPER breadcrumbs %] |
|
Lines 64-72
Link Here
|
| 64 |
[% CASE 'update_success' %] |
64 |
[% CASE 'update_success' %] |
| 65 |
Restriction type updated |
65 |
Restriction type updated |
| 66 |
[% CASE 'duplicate_display_text' %] |
66 |
[% CASE 'duplicate_display_text' %] |
| 67 |
Another restriction already has this label |
67 |
Another restriction type already has this label |
| 68 |
[% CASE 'duplicate_code' %] |
68 |
[% CASE 'duplicate_code' %] |
| 69 |
Another restriction already has this code |
69 |
Another restriction type already has this code |
| 70 |
[% CASE 'delete_success' %] |
70 |
[% CASE 'delete_success' %] |
| 71 |
Restriction type deleted |
71 |
Restriction type deleted |
| 72 |
[% CASE 'delete_default' %] |
72 |
[% CASE 'delete_default' %] |
|
Lines 84-93
Link Here
|
| 84 |
<input type="hidden" name="op" value="add_validate" /> |
84 |
<input type="hidden" name="op" value="add_validate" /> |
| 85 |
<input type="hidden" name="checked" value="0" /> |
85 |
<input type="hidden" name="checked" value="0" /> |
| 86 |
[% IF restriction %] |
86 |
[% IF restriction %] |
| 87 |
<h1>Modify restriction [% PROCESS restriction_type_description restriction_type=restriction %]</h1> |
87 |
<h1>Modify restriction type [% PROCESS restriction_type_description restriction_type=restriction %]</h1> |
| 88 |
<input type="hidden" name="is_a_modif" value="1" /> |
88 |
<input type="hidden" name="is_a_modif" value="1" /> |
| 89 |
[% ELSE %] |
89 |
[% ELSE %] |
| 90 |
<h1>New restriction</h1> |
90 |
<h1>New restriction type</h1> |
| 91 |
[% END %] |
91 |
[% END %] |
| 92 |
<fieldset class="rows"> |
92 |
<fieldset class="rows"> |
| 93 |
<ol> |
93 |
<ol> |
|
Lines 127-133
Link Here
|
| 127 |
<form action="/cgi-bin/koha/admin/restrictions.pl" method="post"> |
127 |
<form action="/cgi-bin/koha/admin/restrictions.pl" method="post"> |
| 128 |
<fieldset> |
128 |
<fieldset> |
| 129 |
<legend> |
129 |
<legend> |
| 130 |
Confirm restriction deletion |
130 |
Confirm restriction type deletion |
| 131 |
</legend> |
131 |
</legend> |
| 132 |
|
132 |
|
| 133 |
<p>Are you sure you want to delete "[% PROCESS restriction_type_description restriction_type=restriction %]"?</p> |
133 |
<p>Are you sure you want to delete "[% PROCESS restriction_type_description restriction_type=restriction %]"?</p> |
|
Lines 135-141
Link Here
|
| 135 |
<fieldset class="action"> |
135 |
<fieldset class="action"> |
| 136 |
<input type="hidden" name="op" value="delete_confirmed" /> |
136 |
<input type="hidden" name="op" value="delete_confirmed" /> |
| 137 |
<input type="hidden" name="code" value="[% restriction.code | html %]" /> |
137 |
<input type="hidden" name="code" value="[% restriction.code | html %]" /> |
| 138 |
<input type="submit" class="btn btn-primary" value="Delete this restriction" /> |
138 |
<input type="submit" class="btn btn-primary" value="Delete this restriction type" /> |
| 139 |
<a class="cancel" href="/cgi-bin/koha/admin/restrictions.pl">Cancel</a> |
139 |
<a class="cancel" href="/cgi-bin/koha/admin/restrictions.pl">Cancel</a> |
| 140 |
</fieldset> |
140 |
</fieldset> |
| 141 |
</fieldset> |
141 |
</fieldset> |
|
Lines 145-154
Link Here
|
| 145 |
[% IF op == 'list' %] |
145 |
[% IF op == 'list' %] |
| 146 |
|
146 |
|
| 147 |
<div id="toolbar" class="btn-toolbar"> |
147 |
<div id="toolbar" class="btn-toolbar"> |
| 148 |
<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> |
148 |
<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> |
| 149 |
</div> |
149 |
</div> |
| 150 |
|
150 |
|
| 151 |
<h1>Patron restrictions</h1> |
151 |
<h1>Patron restriction types</h1> |
| 152 |
|
152 |
|
| 153 |
[% IF restrictions %] |
153 |
[% IF restrictions %] |
| 154 |
<div class="page-section"> |
154 |
<div class="page-section"> |
|
Lines 188-194
Link Here
|
| 188 |
</table> |
188 |
</table> |
| 189 |
</div><!-- /.page-section --> |
189 |
</div><!-- /.page-section --> |
| 190 |
[% ELSE %] |
190 |
[% ELSE %] |
| 191 |
<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> |
191 |
<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> |
| 192 |
[% END %] |
192 |
[% END %] |
| 193 |
[% END %] |
193 |
[% END %] |
| 194 |
|
194 |
|
|
Lines 207-214
Link Here
|
| 207 |
[% INCLUDE 'datatables.inc' %] |
207 |
[% INCLUDE 'datatables.inc' %] |
| 208 |
[% INCLUDE 'columns_settings.inc' %] |
208 |
[% INCLUDE 'columns_settings.inc' %] |
| 209 |
<script> |
209 |
<script> |
| 210 |
var MSG_DUPLICATE_CODE = _("Restriction code is already in use"); |
210 |
var MSG_DUPLICATE_CODE = _("Restriction type code is already in use"); |
| 211 |
var MSG_DUPLICATE_DISPLAY_TEXT = _("Label is already in use"); |
211 |
var MSG_DUPLICATE_DISPLAY_TEXT = _("Restriction type label is already in use"); |
| 212 |
var existing = { |
212 |
var existing = { |
| 213 |
[% FOREACH ex IN existing %] |
213 |
[% FOREACH ex IN existing %] |
| 214 |
[% ex.code | $raw %]: '[% ex.display_text | $raw %]', |
214 |
[% ex.code | $raw %]: '[% ex.display_text | $raw %]', |
| 215 |
- |
|
|