View | Details | Raw Unified | Return to bug 41841
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (-110 / +220 lines)
Lines 34-41 Link Here
34
[% INCLUDE 'doc-head-close.inc' %]
34
[% INCLUDE 'doc-head-close.inc' %]
35
[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
35
[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
36
<style>
36
<style>
37
    #enrolmentmessage.hint {
37
    fieldset.fg fieldset legend {
38
        display: none;
38
        font-size: 1.2rem;
39
    }
39
    }
40
</style>
40
</style>
41
</head>
41
</head>
Lines 128-187 Link Here
128
            [% ELSE %]
128
            [% ELSE %]
129
                <h1>New category</h1>
129
                <h1>New category</h1>
130
            [% END %]
130
            [% END %]
131
            <fieldset class="rows">
131
            <fieldset class="fg">
132
                <ol>
132
                [% IF category %]
133
                    [% IF category %]
133
                    <div class="fg-row">
134
                        <li> <span class="label">Category code: </span>[% categorycode | html %] <input type="hidden" name="categorycode" value="[% category.categorycode | html %]" /><input type="hidden" name="is_a_modif" value="1" /> </li>
134
                        <div class="fg-label">
135
                    [% ELSE %]
135
                            <span class="label">Category code: </span>
136
                        <li>
136
                        </div>
137
                        <div class="fg-text">
138
                            [% categorycode | html %]
139
                            <input type="hidden" name="categorycode" value="[% category.categorycode | html %]" />
140
                            <input type="hidden" name="is_a_modif" value="1" />
141
                        </div>
142
                    </div>
143
                [% ELSE %]
144
                    <div class="fg-row">
145
                        <div class="fg-label">
137
                            <label for="categorycode" class="required">Category code: </label>
146
                            <label for="categorycode" class="required">Category code: </label>
138
                            <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required focus" required="required" />
147
                        </div>
139
                            <span class="required">Required</span>
148
                        <div class="fg-input">
140
                        </li>
149
                            <input type="text" name="categorycode" id="categorycode" maxlength="10" class="required focus" required="required" />
141
                    [% END %]
150
                        </div>
142
                    <li>
151
                        <div class="required">Required</div>
152
                    </div>
153
                [% END %]
154
                <div class="fg-row">
155
                    <div class="fg-label">
143
                        <label for="description" class="required">Description: </label>
156
                        <label for="description" class="required">Description: </label>
144
                        <input type="text" name="description" id="description" size="40" maxlength="80" class="required" required="required" value="[% category.description | html %]" />
157
                    </div>
145
                        <span class="required">Required</span>
158
                    <div class="fg-input">
146
                    </li>
159
                        <input type="text" name="description" id="description" maxlength="80" class="required" required="required" value="[% category.description | html %]" />
147
                    <li>
160
                    </div>
161
                    <div class="required">Required</div>
162
                </div>
163
                <div class="fg-row">
164
                    <div class="fg-label">
148
                        <span class="label">Enrollment period: </span>
165
                        <span class="label">Enrollment period: </span>
166
                    </div>
167
                    <div class="fg-text">
149
                        <fieldset>
168
                        <fieldset>
150
                            <legend>Choose one</legend>
169
                            <legend>Choose one</legend>
151
                            <ol>
170
                            <div class="fg-row">
152
                                <li>
171
                                <div class="fg-label">
153
                                    <label for="enrolmentperiod">In months: </label>
172
                                    <label for="enrolmentperiod">In months: </label>
173
                                </div>
174
                                <div class="fg-input">
154
                                    [% IF category.enrolmentperiod %]
175
                                    [% IF category.enrolmentperiod %]
155
                                        <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="[% category.enrolmentperiod | html %]" /> months
176
                                        <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" maxlength="3" value="[% category.enrolmentperiod | html %]" /> months
156
                                    [% ELSE %]
177
                                    [% ELSE %]
157
                                        <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" maxlength="3" value="" /> months
178
                                        <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperiod" maxlength="3" value="" /> months
158
                                    [% END %]
179
                                    [% END %]
159
                                </li>
180
                                </div>
160
                                <li>
181
                            </div>
182
                            <div class="fg-row">
183
                                <div class="fg-label">
161
                                    <label for="enrolmentperioddate">Until date: </label>
184
                                    <label for="enrolmentperioddate">Until date: </label>
185
                                </div>
186
                                <div class="fg-input">
162
                                    <input type="text" class="enrollmentperiod flatpickr" data-flatpickr-futuredate="true" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | html %]" />
187
                                    <input type="text" class="enrollmentperiod flatpickr" data-flatpickr-futuredate="true" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | html %]" />
163
                                </li>
188
                                </div>
164
                            </ol>
189
                            </div>
165
                        </fieldset>
190
                        </fieldset>
166
                    </li>
191
                    </div>
167
                    <li>
192
                </div>
193
                <div class="fg-row input-sm">
194
                    <div class="fg-label">
168
                        <label for="password_expiry_days">Password expiration: </label>
195
                        <label for="password_expiry_days">Password expiration: </label>
169
                        <input type="text" name="password_expiry_days" id="password_expiry_days" value="[% category.password_expiry_days | html %]" size="3" maxlength="5" /> days
196
                    </div>
170
                    </li>
197
                    <div class="fg-input"> <input type="text" name="password_expiry_days" id="password_expiry_days" value="[% category.password_expiry_days | html %]" maxlength="5" /> days </div>
171
                    <li>
198
                </div>
199
                <div class="fg-row input-sm">
200
                    <div class="fg-label">
172
                        <label for="dateofbirthrequired">Age required: </label>
201
                        <label for="dateofbirthrequired">Age required: </label>
173
                        <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% category.dateofbirthrequired | html %]" size="3" maxlength="3" /> years
202
                    </div>
174
                    </li>
203
                    <div class="fg-input"> <input type="text" name="dateofbirthrequired" id="dateofbirthrequired" value="[% category.dateofbirthrequired | html %]" maxlength="3" /> years </div>
175
                    <li>
204
                </div>
205
                <div class="fg-row input-sm">
206
                    <div class="fg-label">
176
                        <label for="upperagelimit">Upperage limit: </label>
207
                        <label for="upperagelimit">Upperage limit: </label>
177
                        <input type="text" name="upperagelimit" id="upperagelimit" size="3" maxlength="3" value="[% category.upperagelimit | html %]" /> years
208
                    </div>
178
                    </li>
209
                    <div class="fg-input"> <input type="text" name="upperagelimit" id="upperagelimit" maxlength="3" value="[% category.upperagelimit | html %]" /> years </div>
179
                    <li>
210
                </div>
211
                <div class="fg-row input-sm">
212
                    <div class="fg-label">
180
                        <label for="enrolmentfee">Enrollment fee: </label>
213
                        <label for="enrolmentfee">Enrollment fee: </label>
181
                        <input type="text" name="enrolmentfee" id="enrolmentfee" size="6" value="[% category.enrolmentfee | $Price on_editing => 1 %]" />
214
                    </div>
182
                    </li>
215
                    <div class="fg-input">
183
                    <li>
216
                        <input type="text" name="enrolmentfee" id="enrolmentfee" value="[% category.enrolmentfee | $Price on_editing => 1 %]" />
217
                    </div>
218
                </div>
219
                <div class="fg-row input-md">
220
                    <div class="fg-label">
184
                        <label for="overduenoticerequired">Overdue notice required: </label>
221
                        <label for="overduenoticerequired">Overdue notice required: </label>
222
                    </div>
223
                    <div class="fg-input">
185
                        <select name="overduenoticerequired" id="overduenoticerequired">
224
                        <select name="overduenoticerequired" id="overduenoticerequired">
186
                            [% IF category.overduenoticerequired %]
225
                            [% IF category.overduenoticerequired %]
187
                                <option value="0">No</option>
226
                                <option value="0">No</option>
Lines 191-199 Link Here
191
                                <option value="1">Yes</option>
230
                                <option value="1">Yes</option>
192
                            [% END %]
231
                            [% END %]
193
                        </select>
232
                        </select>
194
                    </li>
233
                    </div>
195
                    <li>
234
                </div>
235
                <div class="fg-row input-md">
236
                    <div class="fg-label">
196
                        <label for="hidelostitems">Lost items in staff interface: </label>
237
                        <label for="hidelostitems">Lost items in staff interface: </label>
238
                    </div>
239
                    <div class="fg-input">
197
                        <select name="hidelostitems" id="hidelostitems">
240
                        <select name="hidelostitems" id="hidelostitems">
198
                            [% IF category.hidelostitems %]
241
                            [% IF category.hidelostitems %]
199
                                <option value="0">Shown</option>
242
                                <option value="0">Shown</option>
Lines 203-211 Link Here
203
                                <option value="1">Hidden by default</option>
246
                                <option value="1">Hidden by default</option>
204
                            [% END %]
247
                            [% END %]
205
                        </select>
248
                        </select>
206
                    </li>
249
                    </div>
207
                    <li>
250
                </div>
251
                <div class="fg-row">
252
                    <div class="fg-label">
208
                        <label for="category_type" class="required">Category type: </label>
253
                        <label for="category_type" class="required">Category type: </label>
254
                    </div>
255
                    <div class="fg-input">
209
                        <select name="category_type" id="category_type">
256
                        <select name="category_type" id="category_type">
210
                            [% UNLESS category %]<option value="" selected="selected">Select a category type</option>[% ELSE %]<option value="">Select a category type</option>[% END %]
257
                            [% UNLESS category %]<option value="" selected="selected">Select a category type</option>[% ELSE %]<option value="">Select a category type</option>[% END %]
211
                            [% IF category and category.category_type == 'A' %]<option value="A" selected="selected">Adult</option>[% ELSE %]<option value="A">Adult</option>[% END %]
258
                            [% IF category and category.category_type == 'A' %]<option value="A" selected="selected">Adult</option>[% ELSE %]<option value="A">Adult</option>[% END %]
Lines 215-224 Link Here
215
                            [% IF category and category.category_type == 'P' %]<option value="P" selected="selected">Professional</option>[% ELSE %]<option value="P">Professional</option>[% END %]
262
                            [% IF category and category.category_type == 'P' %]<option value="P" selected="selected">Professional</option>[% ELSE %]<option value="P">Professional</option>[% END %]
216
                            [% IF category and category.category_type == 'X' %]<option value="X" selected="selected">Statistical</option>[% ELSE %]<option value="X">Statistical</option>[% END %]
263
                            [% IF category and category.category_type == 'X' %]<option value="X" selected="selected">Statistical</option>[% ELSE %]<option value="X">Statistical</option>[% END %]
217
                        </select>
264
                        </select>
218
                        <span class="required">Required</span>
265
                    </div>
219
                    </li>
266
                    <div class="required">Required</div>
220
                    <li>
267
                </div>
268
                <div class="fg-row input-sm">
269
                    <div class="fg-label">
221
                        <label for="can_be_guarantee">Can be guarantee:</label>
270
                        <label for="can_be_guarantee">Can be guarantee:</label>
271
                    </div>
272
                    <div class="fg-input">
222
                        <select name="can_be_guarantee" id="can_be_guarantee">
273
                        <select name="can_be_guarantee" id="can_be_guarantee">
223
                            [% IF category.can_be_guarantee %]
274
                            [% IF category.can_be_guarantee %]
224
                                <option value="1" selected>Yes</option>
275
                                <option value="1" selected>Yes</option>
Lines 228-243 Link Here
228
                                <option value="0" selected>No</option>
279
                                <option value="0" selected>No</option>
229
                            [% END %]
280
                            [% END %]
230
                        </select>
281
                        </select>
231
                    </li>
282
                    </div>
232
                    <li
283
                </div>
233
                        ><label for="library_limitation">Library limitations: </label>
284
                <div class="fg-row">
285
                    <div class="fg-label">
286
                        <label for="library_limitation">Library limitations: </label>
287
                    </div>
288
                    <div class="fg-input">
234
                        <select id="library_limitation" name="branches" multiple size="10">
289
                        <select id="library_limitation" name="branches" multiple size="10">
235
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => category.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
290
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => category.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
236
                        </select>
291
                        </select>
237
                        <div class="hint">Limits the use of this category to the selected libraries.</div>
292
                    </div>
238
                    </li>
293
                    <div class="hint">Limits the use of this category to the selected libraries.</div>
239
                    <li>
294
                </div>
295
                <div class="fg-row">
296
                    <div class="fg-label">
240
                        <label for="reset_password">Password reset in OPAC: </label>
297
                        <label for="reset_password">Password reset in OPAC: </label>
298
                    </div>
299
                    <div class="fg-input">
241
                        <select name="reset_password" id="reset_password">
300
                        <select name="reset_password" id="reset_password">
242
                            [% IF category.reset_password.defined %]
301
                            [% IF category.reset_password.defined %]
243
                                [% IF category.reset_password %]
302
                                [% IF category.reset_password %]
Lines 267-275 Link Here
267
                                <option value="0">Not allowed</option>
326
                                <option value="0">Not allowed</option>
268
                            [% END %]
327
                            [% END %]
269
                        </select>
328
                        </select>
270
                    </li>
329
                    </div>
271
                    <li>
330
                </div>
331
                <div class="fg-row">
332
                    <div class="fg-label">
272
                        <label for="change_password">Password change in OPAC: </label>
333
                        <label for="change_password">Password change in OPAC: </label>
334
                    </div>
335
                    <div class="fg-input">
273
                        <select name="change_password" id="change_password">
336
                        <select name="change_password" id="change_password">
274
                            [% IF category.change_password.defined %]
337
                            [% IF category.change_password.defined %]
275
                                [% IF category.change_password %]
338
                                [% IF category.change_password %]
Lines 299-312 Link Here
299
                                <option value="0">Not allowed</option>
362
                                <option value="0">Not allowed</option>
300
                            [% END %]
363
                            [% END %]
301
                        </select>
364
                        </select>
302
                    </li>
365
                    </div>
303
                    <li>
366
                </div>
367
                <div class="fg-row input-sm">
368
                    <div class="fg-label">
304
                        <label for="min_password_length">Minimum password length:</label>
369
                        <label for="min_password_length">Minimum password length:</label>
370
                    </div>
371
                    <div class="fg-input">
305
                        <input id="min_password_length" type="text" inputmode="numeric" name="min_password_length" value="[% category.min_password_length | html %]" />
372
                        <input id="min_password_length" type="text" inputmode="numeric" name="min_password_length" value="[% category.min_password_length | html %]" />
306
                        <div class="hint">Leave blank to use system default ([% Koha.Preference('minPasswordLength') | html %])</div>
373
                    </div>
307
                    </li>
374
                    <div class="hint">Leave blank to use system default ([% Koha.Preference('minPasswordLength') | html %])</div>
308
                    <li class="pwd_setting_wrapper">
375
                </div>
376
                <div class="fg-row pwd_setting_wrapper">
377
                    <div class="fg-label">
309
                        <label for="require_strong_password">Require strong password:</label>
378
                        <label for="require_strong_password">Require strong password:</label>
379
                    </div>
380
                    <div class="fg-input">
310
                        <select id="require_strong_password" name="require_strong_password">
381
                        <select id="require_strong_password" name="require_strong_password">
311
                            [% IF category.require_strong_password.defined %]
382
                            [% IF category.require_strong_password.defined %]
312
                                [% IF category.require_strong_password %]
383
                                [% IF category.require_strong_password %]
Lines 336-344 Link Here
336
                                <option value="0">No</option>
407
                                <option value="0">No</option>
337
                            [% END %]
408
                            [% END %]
338
                        </select>
409
                        </select>
339
                    </li>
410
                    </div>
340
                    <li>
411
                </div>
412
                <div class="fg-row">
413
                    <div class="fg-label">
341
                        <label for="force_password_reset_when_set_by_staff">Force new patron password reset: </label>
414
                        <label for="force_password_reset_when_set_by_staff">Force new patron password reset: </label>
415
                    </div>
416
                    <div class="fg-input">
342
                        <select name="force_password_reset_when_set_by_staff" id="force_password_reset_when_set_by_staff">
417
                        <select name="force_password_reset_when_set_by_staff" id="force_password_reset_when_set_by_staff">
343
                            [% IF category.force_password_reset_when_set_by_staff.defined %]
418
                            [% IF category.force_password_reset_when_set_by_staff.defined %]
344
                                [% IF category.force_password_reset_when_set_by_staff %]
419
                                [% IF category.force_password_reset_when_set_by_staff %]
Lines 368-377 Link Here
368
                                <option value="0">Don't force</option>
443
                                <option value="0">Don't force</option>
369
                            [% END %]
444
                            [% END %]
370
                        </select>
445
                        </select>
371
                        <div class="hint"> Choose whether staff-created patrons of this category are forced to change their password after their first OPAC login. </div>
446
                    </div>
372
                    </li>
447
                    <div class="hint"> Choose whether staff-created patrons of this category are forced to change their password after their first OPAC login. </div>
373
                    <li
448
                </div>
374
                        ><label for="block_expired">Block expired patron OPAC actions:</label>
449
                <div class="fg-row">
450
                    <div class="fg-label">
451
                        <label for="block_expired">Block expired patron OPAC actions:</label>
452
                    </div>
453
                    <div class="fg-input">
375
                        <select name="BlockExpiredPatronOpacActions" id="block_expired" multiple="multiple">
454
                        <select name="BlockExpiredPatronOpacActions" id="block_expired" multiple="multiple">
376
                            <optgroup label="Follow system preference">
455
                            <optgroup label="Follow system preference">
377
                                [% IF category and category.BlockExpiredPatronOpacActions_contains('follow_syspref_BlockExpiredPatronOpacActions') %]
456
                                [% IF category and category.BlockExpiredPatronOpacActions_contains('follow_syspref_BlockExpiredPatronOpacActions') %]
Lines 398-412 Link Here
398
                                [% END %]
477
                                [% END %]
399
                            </optgroup>
478
                            </optgroup>
400
                        </select>
479
                        </select>
401
                        [%- SET pref_BlockExpiredPatronOpacActions_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=BlockExpiredPatronOpacActions&ok=Search">BlockExpiredPatronOpacActions</a>' -%]
480
                    </div>
402
                        <div class="hint"
481
                    [%- SET pref_BlockExpiredPatronOpacActions_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=BlockExpiredPatronOpacActions&ok=Search">BlockExpiredPatronOpacActions</a>' -%]
403
                            >Choose which OPAC actions, if any, should be blocked for expired patrons in this category. Alternatively, you can use the system preference [%- pref_BlockExpiredPatronOpacActions_link | $raw | $KohaSpan -%]
482
                    <div class="hint"
404
                            instead.</div
483
                        >Choose which OPAC actions, if any, should be blocked for expired patrons in this category. Alternatively, you can use the system preference [%- pref_BlockExpiredPatronOpacActions_link | $raw | $KohaSpan -%]
405
                        >
484
                        instead.</div
406
                    </li>
485
                    >
407
                    [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
486
                </div>
408
                        <li
487
                [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
409
                            ><label for="checkprevcheckout">Check for previous checkouts: </label>
488
                    <div class="fg-row input-sm">
489
                        <div class="fg-label">
490
                            <label for="checkprevcheckout">Check for previous checkouts: </label>
491
                        </div>
492
                        <div class="fg-input">
410
                            <select name="checkprevcheckout" id="checkprevcheckout">
493
                            <select name="checkprevcheckout" id="checkprevcheckout">
411
                                [% IF category.checkprevcheckout == 'yes' %]
494
                                [% IF category.checkprevcheckout == 'yes' %]
412
                                    <option value="yes" selected="selected">Yes and try to override system preferences</option>
495
                                    <option value="yes" selected="selected">Yes and try to override system preferences</option>
Lines 422-433 Link Here
422
                                    <option value="inherit" selected="selected">Inherit from system preferences</option>
505
                                    <option value="inherit" selected="selected">Inherit from system preferences</option>
423
                                [% END %]
506
                                [% END %]
424
                            </select>
507
                            </select>
425
                            <div class="hint"> Choose whether patrons of this category by default are reminded if they try to borrow an item they borrowed before. </div>
508
                        </div>
426
                        </li>
509
                        <div class="hint"> Choose whether patrons of this category by default are reminded if they try to borrow an item they borrowed before. </div>
427
                    [% END %]
510
                    </div>
428
                    [% IF ( Koha.Preference('ILLModule') ) %]
511
                [% END %]
429
                        <li>
512
                [% IF ( Koha.Preference('ILLModule') ) %]
513
                    <div class="fg-row input-sm">
514
                        <div class="fg-label">
430
                            <label for="can_place_ill_in_opac">Can place ILL in OPAC: </label>
515
                            <label for="can_place_ill_in_opac">Can place ILL in OPAC: </label>
516
                        </div>
517
                        <div class="fg-input">
431
                            <select id="can_place_ill_in_opac" name="can_place_ill_in_opac">
518
                            <select id="can_place_ill_in_opac" name="can_place_ill_in_opac">
432
                                [% IF category.can_place_ill_in_opac %]
519
                                [% IF category.can_place_ill_in_opac %]
433
                                    <option value="0">No</option>
520
                                    <option value="0">No</option>
Lines 437-447 Link Here
437
                                    <option value="1">Yes</option>
524
                                    <option value="1">Yes</option>
438
                                [% END %]
525
                                [% END %]
439
                            </select>
526
                            </select>
440
                            <div class="hint"> Choose whether patrons of this category can create new interlibrary loan requests. </div>
527
                        </div>
441
                        </li>
528
                        <div class="hint"> Choose whether patrons of this category can create new interlibrary loan requests. </div>
442
                    [% END %]
529
                    </div>
443
                    <li>
530
                [% END %]
531
                <div class="fg-row">
532
                    <div class="fg-label">
444
                        <label for="default_privacy">Default privacy: </label>
533
                        <label for="default_privacy">Default privacy: </label>
534
                    </div>
535
                    <div class="fg-input">
445
                        <select id="default_privacy" name="default_privacy">
536
                        <select id="default_privacy" name="default_privacy">
446
                            [% SET default_privacy = 'default' %]
537
                            [% SET default_privacy = 'default' %]
447
                            [% IF category %][% SET default_privacy = category.default_privacy %][% END %]
538
                            [% IF category %][% SET default_privacy = category.default_privacy %][% END %]
Lines 460-472 Link Here
460
                                <option value="forever">Forever</option>
551
                                <option value="forever">Forever</option>
461
                            [% END %]
552
                            [% END %]
462
                        </select>
553
                        </select>
463
                        <div class="hint"
554
                    </div>
464
                            >Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default",
555
                    <div class="hint">
465
                            the amount of history kept is controlled by the cronjob <em>batch_anonymise.pl</em> which should be set up by your system administrator.</div
556
                        Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the
466
                        >
557
                        amount of history kept is controlled by the cronjob <em>batch_anonymise.pl</em> which should be set up by your system administrator.
467
                    </li>
558
                    </div>
468
                    <li>
559
                </div>
560
                <div class="fg-row input-sm">
561
                    <div class="fg-label">
469
                        <label for="exclude_from_local_holds_priority">Exclude from local holds priority:</label>
562
                        <label for="exclude_from_local_holds_priority">Exclude from local holds priority:</label>
563
                    </div>
564
                    <div class="fg-input">
470
                        <select id="exclude_from_local_holds_priority" name="exclude_from_local_holds_priority">
565
                        <select id="exclude_from_local_holds_priority" name="exclude_from_local_holds_priority">
471
                            [% IF category.exclude_from_local_holds_priority %]
566
                            [% IF category.exclude_from_local_holds_priority %]
472
                                <option value="1" selected>Yes</option>
567
                                <option value="1" selected>Yes</option>
Lines 476-511 Link Here
476
                                <option value="0" selected>No</option>
571
                                <option value="0" selected>No</option>
477
                            [% END %]
572
                            [% END %]
478
                        </select>
573
                        </select>
479
                        <div class="hint">If <i>Yes</i>, holds placed by patrons of this category will not be given priority.</div>
574
                    </div>
480
                    </li>
575
                    <div class="hint">If <i>Yes</i>, holds placed by patrons of this category will not be given priority.</div>
481
                    <li>
576
                </div>
577
                <div class="fg-row input-sm">
578
                    <div class="fg-label">
482
                        <label for="noissuescharge">Checkout charge limit: </label>
579
                        <label for="noissuescharge">Checkout charge limit: </label>
483
                        <input type="text" pattern="^\d+(\.\d{2})?$" name="noissuescharge" id="noissuescharge" value="[% category.noissuescharge | $Price on_editing => 1 %]" size="5" maxlength="8" />
580
                    </div>
484
                        [%- SET pref_noissuescharge_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">noissuescharge</a>' -%]
581
                    <div class="fg-input">
485
                        <div class="hint">If set, this will override the global value set in the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.</div>
582
                        <input type="text" pattern="^\d+(\.\d{2})?$" name="noissuescharge" id="noissuescharge" value="[% category.noissuescharge | $Price on_editing => 1 %]" maxlength="8" />
486
                    </li>
583
                    </div>
487
                    <li>
584
                    [%- SET pref_noissuescharge_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">noissuescharge</a>' -%]
585
                    <div class="hint">If set, this will override the global value set in the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.</div>
586
                </div>
587
                <div class="fg-row input-sm">
588
                    <div class="fg-label">
488
                        <label for="noissueschargeguarantees">Guarantees checkout charge limit: </label>
589
                        <label for="noissueschargeguarantees">Guarantees checkout charge limit: </label>
489
                        <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantees" id="noissueschargeguarantees" value="[% category.noissueschargeguarantees | $Price on_editing => 1 %]" size="5" maxlength="8" />
590
                    </div>
490
                        [%- SET pref_NoIssuesChargeGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantees&ok=Search">NoIssuesChargeGuarantees</a>' -%]
591
                    <div class="fg-input">
491
                        <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantees_link | $raw | $KohaSpan -%] system preference.</div>
592
                        <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantees" id="noissueschargeguarantees" value="[% category.noissueschargeguarantees | $Price on_editing => 1 %]" maxlength="8" />
492
                    </li>
593
                    </div>
493
                    <li>
594
                    [%- SET pref_NoIssuesChargeGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantees&ok=Search">NoIssuesChargeGuarantees</a>' -%]
595
                    <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantees_link | $raw | $KohaSpan -%] system preference.</div>
596
                </div>
597
                <div class="fg-row input-sm">
598
                    <div class="fg-label">
494
                        <label for="noissueschargeguarantorswithguarantees">Guarantors with guarantees checkout charge limit: </label>
599
                        <label for="noissueschargeguarantorswithguarantees">Guarantors with guarantees checkout charge limit: </label>
600
                    </div>
601
                    <div class="fg-input">
495
                        <input
602
                        <input
496
                            type="text"
603
                            type="text"
497
                            pattern="^\d+(\.\d{2})?$"
604
                            pattern="^\d+(\.\d{2})?$"
498
                            name="noissueschargeguarantorswithguarantees"
605
                            name="noissueschargeguarantorswithguarantees"
499
                            id="noissueschargeguarantorswithguarantees"
606
                            id="noissueschargeguarantorswithguarantees"
500
                            value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]"
607
                            value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]"
501
                            size="5"
502
                            maxlength="8"
608
                            maxlength="8"
503
                        />
609
                        />
504
                        [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantorsWithGuarantees&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a>' -%]
610
                    </div>
505
                        <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.</div>
611
                    [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantees&ok=Search">NoIssuesChargeGuarantees</a>' -%]
506
                    </li>
612
                    <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.</div>
507
                    <li>
613
                </div>
614
                <div class="fg-row input-sm">
615
                    <div class="fg-label">
508
                        <label for="enforce_expiry_notice">Enforce patron account expiry notice:</label>
616
                        <label for="enforce_expiry_notice">Enforce patron account expiry notice:</label>
617
                    </div>
618
                    <div class="fg-input">
509
                        <select name="enforce_expiry_notice" id="enforce_expiry_notice">
619
                        <select name="enforce_expiry_notice" id="enforce_expiry_notice">
510
                            [% IF category.enforce_expiry_notice %]
620
                            [% IF category.enforce_expiry_notice %]
511
                                <option value="1" selected>Yes</option>
621
                                <option value="1" selected>Yes</option>
Lines 515-523 Link Here
515
                                <option value="0" selected>No</option>
625
                                <option value="0" selected>No</option>
516
                            [% END %]
626
                            [% END %]
517
                        </select>
627
                        </select>
518
                        <div class="hint">Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences</div>
628
                    </div>
519
                    </li>
629
                    <div class="hint">Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences</div>
520
                </ol>
630
                </div>
521
            </fieldset>
631
            </fieldset>
522
632
523
            [% IF ( EnhancedMessagingPreferences ) %]
633
            [% IF ( EnhancedMessagingPreferences ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-83 / +149 lines)
Lines 87-113 Link Here
87
        <form action="/cgi-bin/koha/admin/patron-attr-types.pl" class="validated" method="post">
87
        <form action="/cgi-bin/koha/admin/patron-attr-types.pl" class="validated" method="post">
88
            [% INCLUDE 'csrf-token.inc' %]
88
            [% INCLUDE 'csrf-token.inc' %]
89
            <input type="hidden" name="op" value="[% confirm_op | html %]" />
89
            <input type="hidden" name="op" value="[% confirm_op | html %]" />
90
            <fieldset class="rows">
90
            <fieldset class="fg">
91
                <ol>
91
                <div class="fg-row">
92
                    <li>
92
                    [% IF attribute_type %]
93
                        [% IF attribute_type %]
93
                        <div class="fg-label">
94
                            <span class="label">Patron attribute type code: </span>
94
                            <span class="label">Patron attribute type code: </span>
95
                        </div>
96
                        <div class="fg-input">
95
                            <input type="hidden" name="code" value="[% attribute_type.code |html %]" />
97
                            <input type="hidden" name="code" value="[% attribute_type.code |html %]" />
96
                            [% attribute_type.code |html %]
98
                            [% attribute_type.code |html %]
97
                        [% ELSE %]
99
                        </div>
100
                    [% ELSE %]
101
                        <div class="fg-label">
98
                            <label for="code" class="required">Patron attribute type code: </label>
102
                            <label for="code" class="required">Patron attribute type code: </label>
103
                        </div>
104
                        <div class="fg-input">
99
                            <input type="text" id="code" name="code" required="required" class="required focus" maxlength="64" />
105
                            <input type="text" id="code" name="code" required="required" class="required focus" maxlength="64" />
100
                            <span class="required">Required</span>
106
                        </div>
101
                        [% END %]
107
                        <div class="required">Required</div>
102
                    </li>
108
                    [% END %]
103
                    <li
109
                </div>
104
                        ><label for="description" class="required">Description: </label>
110
                <div class="fg-row">
105
                        <input type="text" id="description" name="description" required="required" class="required" size="50" maxlength="250" value="[% attribute_type.description |html %]" />
111
                    <div class="fg-label">
106
                        <span class="required">Required</span>
112
                        <label for="description" class="required">Description: </label>
107
                    </li>
113
                    </div>
114
                    <div class="fg-input">
115
                        <input type="text" id="description" name="description" required="required" class="required" maxlength="250" value="[% attribute_type.description |html %]" />
116
                    </div>
117
                    <div class="required">Required</div>
118
                </div>
108
119
109
                    <li [% IF attribute_type AND attribute_type.repeatable AND NOT can_be_set_to_nonrepeatable %]aria-disabled="true"[% END %]>
120
                <div class="fg-row input-checkbox" [% IF attribute_type AND attribute_type.repeatable AND NOT can_be_set_to_nonrepeatable %]aria-disabled="true"[% END %]>
110
                        <label for="repeatable">Repeatable: </label>
121
                    <div class="fg-label">
122
                        <label for="repeatable">Repeatable</label>
123
                    </div>
124
                    <div class="fg-input">
111
                        [% IF attribute_type %]
125
                        [% IF attribute_type %]
112
                            [% IF attribute_type.repeatable AND NOT can_be_set_to_nonrepeatable %]
126
                            [% IF attribute_type.repeatable AND NOT can_be_set_to_nonrepeatable %]
113
                                <input type="checkbox" id="repeatable" name="repeatable" checked="checked" disabled="disabled" title="At least one patron has more than one value for this attribute" />
127
                                <input type="checkbox" id="repeatable" name="repeatable" checked="checked" disabled="disabled" title="At least one patron has more than one value for this attribute" />
Lines 120-130 Link Here
120
                        [% ELSE %]
134
                        [% ELSE %]
121
                            <input type="checkbox" id="repeatable" name="repeatable" />
135
                            <input type="checkbox" id="repeatable" name="repeatable" />
122
                        [% END %]
136
                        [% END %]
123
                        <span class="hint">Check to let a patron record have multiple values of this attribute.</span>
137
                    </div>
124
                    </li>
138
                    <div class="hint">Check to let a patron record have multiple values of this attribute.</div>
139
                </div>
125
140
126
                    <li [% IF attribute_type AND not can_be_set_to_unique %]aria-disabled="true"[% END %]>
141
                <div class="fg-row input-checkbox" [% IF attribute_type AND not can_be_set_to_unique %]aria-disabled="true"[% END %]>
127
                        <label for="unique_id">Unique identifier: </label>
142
                    <div class="fg-label">
143
                        <label for="unique_id">Unique identifier</label>
144
                    </div>
145
                    <div class="fg-input">
128
                        [% IF attribute_type %]
146
                        [% IF attribute_type %]
129
                            [% IF attribute_type.unique_id %]
147
                            [% IF attribute_type.unique_id %]
130
                                <input type="checkbox" id="unique_id" name="unique_id" checked="checked" />
148
                                <input type="checkbox" id="unique_id" name="unique_id" checked="checked" />
Lines 137-249 Link Here
137
                        [% ELSE %]
155
                        [% ELSE %]
138
                            <input type="checkbox" id="unique_id" name="unique_id" />
156
                            <input type="checkbox" id="unique_id" name="unique_id" />
139
                        [% END %]
157
                        [% END %]
140
                        <span class="hint">If checked, attribute will be a unique identifier. If a value is given to a patron record, the same value cannot be given to a different record.</span>
158
                    </div>
141
                    </li>
159
                    <div class="hint">If checked, attribute will be a unique identifier. If a value is given to a patron record, the same value cannot be given to a different record.</div>
142
                    <li
160
                </div>
143
                        ><label for="is_date">Is a date: </label>
161
                <div class="fg-row input-checkbox">
162
                    <div class="fg-label">
163
                        <label for="is_date">Is a date</label>
164
                    </div>
165
                    <div class="fg-input">
144
                        [% IF attribute_type AND attribute_type.is_date %]
166
                        [% IF attribute_type AND attribute_type.is_date %]
145
                            <input type="checkbox" id="is_date" name="is_date" checked="checked" />
167
                            <input type="checkbox" id="is_date" name="is_date" checked="checked" />
146
                        [% ELSE %]
168
                        [% ELSE %]
147
                            <input type="checkbox" id="is_date" name="is_date" />
169
                            <input type="checkbox" id="is_date" name="is_date" />
148
                        [% END %]
170
                        [% END %]
149
                        <span class="hint">If checked, the attribute will be a date. Date attributes can be repeatable, but cannot be linked to an authorized value category.</span>
171
                    </div>
150
                    </li>
172
                    <div class="hint">If checked, the attribute will be a date. Date attributes can be repeatable, but cannot be linked to an authorized value category.</div>
151
                    <li
173
                </div>
152
                        ><label for="opac_display">Display in OPAC: </label>
174
                <div class="fg-row input-checkbox">
175
                    <div class="fg-label">
176
                        <label for="opac_display">Display in OPAC</label>
177
                    </div>
178
                    <div class="fg-input">
153
                        [% IF attribute_type AND attribute_type.opac_display %]
179
                        [% IF attribute_type AND attribute_type.opac_display %]
154
                            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
180
                            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
155
                        [% ELSE %]
181
                        [% ELSE %]
156
                            <input type="checkbox" id="opac_display" name="opac_display" />
182
                            <input type="checkbox" id="opac_display" name="opac_display" />
157
                        [% END %]
183
                        [% END %]
158
                        <span class="hint">Check to display this attribute on a patron's details page in the OPAC.</span>
184
                    </div>
159
                    </li>
185
                    <div class="hint">Check to display this attribute on a patron's details page in the OPAC.</div>
160
                    <li
186
                </div>
161
                        ><label for="opac_editable">Editable in OPAC: </label>
187
                <div class="fg-row input-checkbox">
188
                    <div class="fg-label">
189
                        <label for="opac_editable">Editable in OPAC</label>
190
                    </div>
191
                    <div class="fg-input">
162
                        [% IF attribute_type AND attribute_type.opac_editable %]
192
                        [% IF attribute_type AND attribute_type.opac_editable %]
163
                            <input type="checkbox" id="opac_editable" name="opac_editable" checked="checked" />
193
                            <input type="checkbox" id="opac_editable" name="opac_editable" checked="checked" />
164
                        [% ELSE %]
194
                        [% ELSE %]
165
                            <input type="checkbox" id="opac_editable" name="opac_editable" />
195
                            <input type="checkbox" id="opac_editable" name="opac_editable" />
166
                        [% END %]
196
                        [% END %]
167
                        <span class="hint">Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above)</span>
197
                    </div>
168
                    </li>
198
                    <div class="hint">Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above)</div>
169
                    <li
199
                </div>
170
                        ><label for="staff_searchable">Searchable: </label>
200
                <div class="fg-row input-checkbox">
201
                    <div class="fg-label">
202
                        <label for="staff_searchable">Searchable</label>
203
                    </div>
204
                    <div class="fg-input">
171
                        [% IF attribute_type AND attribute_type.staff_searchable %]
205
                        [% IF attribute_type AND attribute_type.staff_searchable %]
172
                            <input type="checkbox" id="staff_searchable" name="staff_searchable" checked="checked" />
206
                            <input type="checkbox" id="staff_searchable" name="staff_searchable" checked="checked" />
173
                        [% ELSE %]
207
                        [% ELSE %]
174
                            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
208
                            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
175
                        [% END %]
209
                        [% END %]
176
                        <span class="hint"> Check to make this attribute searchable in staff patron searches. If checked, this attribute will appear in patron search dropdowns. </span>
210
                    </div>
177
                    </li>
211
                    <div class="hint"> Check to make this attribute searchable in staff patron searches. If checked, this attribute will appear in patron search dropdowns. </div>
178
                    <li
212
                </div>
179
                        ><label for="searched_by_default">Search by default: </label>
213
                <div class="fg-row input-checkbox">
214
                    <div class="fg-label">
215
                        <label for="searched_by_default">Search by default</label>
216
                    </div>
217
                    <div class="fg-input">
180
                        [% IF attribute_type AND attribute_type.searched_by_default %]
218
                        [% IF attribute_type AND attribute_type.searched_by_default %]
181
                            <input type="checkbox" id="searched_by_default" name="searched_by_default" checked="checked" />
219
                            <input type="checkbox" id="searched_by_default" name="searched_by_default" checked="checked" />
182
                        [% ELSE %]
220
                        [% ELSE %]
183
                            <input type="checkbox" id="searched_by_default" name="searched_by_default" />
221
                            <input type="checkbox" id="searched_by_default" name="searched_by_default" />
184
                        [% END %]
222
                        [% END %]
185
                        <span class="hint"> If checked, this field will be included in 'Standard' patron searches. Requires field to be marked as searchable above </span>
223
                    </div>
186
                    </li>
224
                    <div class="hint"> If checked, this field will be included in 'Standard' patron searches. Requires field to be marked as searchable above </div>
187
                    <li
225
                </div>
188
                        ><label for="mandatory">Staff interface mandatory: </label>
226
                <div class="fg-row input-checkbox">
227
                    <div class="fg-label">
228
                        <label for="mandatory">Staff interface mandatory</label>
229
                    </div>
230
                    <div class="fg-input">
189
                        [% IF attribute_type AND attribute_type.mandatory %]
231
                        [% IF attribute_type AND attribute_type.mandatory %]
190
                            <input type="checkbox" id="mandatory" name="mandatory" checked="checked" />
232
                            <input type="checkbox" id="mandatory" name="mandatory" checked="checked" />
191
                        [% ELSE %]
233
                        [% ELSE %]
192
                            <input type="checkbox" id="mandatory" name="mandatory" />
234
                            <input type="checkbox" id="mandatory" name="mandatory" />
193
                        [% END %]
235
                        [% END %]
194
                        <span class="hint">Check to make this attribute mandatory when creating or editing a patron from the staff interface.</span>
236
                    </div>
195
                    </li>
237
                    <div class="hint">Check to make this attribute mandatory when creating or editing a patron from the staff interface.</div>
196
                    <li
238
                </div>
197
                        ><label for="opac_mandatory">OPAC mandatory: </label>
239
                <div class="fg-row input-checkbox">
240
                    <div class="fg-label">
241
                        <label for="opac_mandatory">OPAC mandatory</label>
242
                    </div>
243
                    <div class="fg-input">
198
                        [% IF attribute_type AND attribute_type.opac_mandatory %]
244
                        [% IF attribute_type AND attribute_type.opac_mandatory %]
199
                            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" checked="checked" />
245
                            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" checked="checked" />
200
                        [% ELSE %]
246
                        [% ELSE %]
201
                            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" />
247
                            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" />
202
                        [% END %]
248
                        [% END %]
203
                        <span class="hint">Check to make this attribute mandatory when creating or editing a patron from the OPAC. Requires 'Editable in OPAC.'</span>
249
                    </div>
204
                    </li>
250
                    <div class="hint">Check to make this attribute mandatory when creating or editing a patron from the OPAC. Requires 'Editable in OPAC.'</div>
205
                    <li
251
                </div>
206
                        ><label for="display_checkout">Display in patron's brief information: </label>
252
                <div class="fg-row input-checkbox">
253
                    <div class="fg-label">
254
                        <label for="display_checkout">Display in patron's brief information</label>
255
                    </div>
256
                    <div class="fg-input">
207
                        [% IF attribute_type AND attribute_type.display_checkout %]
257
                        [% IF attribute_type AND attribute_type.display_checkout %]
208
                            <input type="checkbox" id="display_checkout" name="display_checkout" checked="checked" />
258
                            <input type="checkbox" id="display_checkout" name="display_checkout" checked="checked" />
209
                        [% ELSE %]
259
                        [% ELSE %]
210
                            <input type="checkbox" id="display_checkout" name="display_checkout" />
260
                            <input type="checkbox" id="display_checkout" name="display_checkout" />
211
                        [% END %]
261
                        [% END %]
212
                        <span class="hint">Check to show this attribute in the brief information panel in the patron's record (staff interface).</span>
262
                    </div>
213
                    </li>
263
                    <div class="hint">Check to show this attribute in the brief information panel in the patron's record (staff interface).</div>
264
                </div>
214
265
215
                    [% IF Koha.Preference('Pseudonymization') %]
266
                [% IF Koha.Preference('Pseudonymization') %]
216
                        <li>
267
                    <div class="fg-row input-checkbox">
217
                            <label for="keep_for_pseudonymization">Keep for pseudonymization: </label>
268
                        <div class="fg-label">
269
                            <label for="keep_for_pseudonymization">Keep for pseudonymization</label>
270
                        </div>
271
                        <div class="fg-input">
218
                            [% IF attribute_type AND attribute_type.keep_for_pseudonymization %]
272
                            [% IF attribute_type AND attribute_type.keep_for_pseudonymization %]
219
                                <input type="checkbox" id="keep_for_pseudonymization" name="keep_for_pseudonymization" checked="checked" />
273
                                <input type="checkbox" id="keep_for_pseudonymization" name="keep_for_pseudonymization" checked="checked" />
220
                            [% ELSE %]
274
                            [% ELSE %]
221
                                <input type="checkbox" id="keep_for_pseudonymization" name="keep_for_pseudonymization" />
275
                                <input type="checkbox" id="keep_for_pseudonymization" name="keep_for_pseudonymization" />
222
                            [% END %]
276
                            [% END %]
223
                            <span class="hint">Check to make this attribute copied to the patron's pseudonymized attributes.</span>
277
                        </div>
224
                        </li>
278
                        <div class="hint">Check to make this attribute copied to the patron's pseudonymized attributes.</div>
225
                    [% END %]
279
                    </div>
280
                [% END %]
226
281
227
                    <li
282
                <div class="fg-row">
228
                        ><label for="authorised_value_category">Authorized value category: </label>
283
                    <div class="fg-label">
284
                        <label for="authorised_value_category">Authorized value category: </label>
285
                    </div>
286
                    <div class="fg-input">
229
                        <select name="authorised_value_category" id="authorised_value_category">
287
                        <select name="authorised_value_category" id="authorised_value_category">
230
                            <option value=""></option>
288
                            <option value=""></option>
231
                            [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => attribute_type.authorised_value_category ) %]
289
                            [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => attribute_type.authorised_value_category ) %]
232
                        </select>
290
                        </select>
233
                        <div class="hint"
291
                    </div>
234
                            >If one is selected, the patron record input page will only allow values to be chosen from the authorized value list. However, an authorized value list is not enforced during batch patron import.</div
292
                    <div class="hint">If one is selected, the patron record input page will only allow values to be chosen from the authorized value list. However, an authorized value list is not enforced during batch patron import.</div>
235
                        >
293
                </div>
236
                    </li>
294
                <div class="fg-row">
237
                    <li
295
                    <div class="fg-label">
238
                        ><label for="library_limitation">Library limitation: </label>
296
                        <label for="library_limitation">Library limitation: </label>
297
                    </div>
298
                    <div class="fg-input">
239
                        <select id="library_limitation" name="branches" multiple size="10">
299
                        <select id="library_limitation" name="branches" multiple size="10">
240
                            <option value="">All libraries</option>
300
                            <option value="">All libraries</option>
241
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => attribute_type.library_limits ) %]
301
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => attribute_type.library_limits ) %]
242
                        </select>
302
                        </select>
243
                        <div class="hint">Limits the use of this attribute to the selected libraries. </div>
303
                    </div>
244
                    </li>
304
                    <div class="hint">Select "All libraries" if this attribute type should always be displayed. Otherwise select libraries you want to associate with this value. </div>
245
                    <li>
305
                </div>
306
                <div class="fg-row">
307
                    <div class="fg-label">
246
                        <label for="category">Category: </label>
308
                        <label for="category">Category: </label>
309
                    </div>
310
                    <div class="fg-input">
247
                        <select name="category_code" id="category">
311
                        <select name="category_code" id="category">
248
                            <option value=""></option>
312
                            <option value=""></option>
249
                            [% FOREACH cat IN categories %]
313
                            [% FOREACH cat IN categories %]
Lines 254-273 Link Here
254
                                [% END %]
318
                                [% END %]
255
                            [% END %]
319
                            [% END %]
256
                        </select>
320
                        </select>
257
                        <div class="hint">Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.</div>
321
                    </div>
258
                    </li>
322
                    <div class="hint">Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.</div>
259
                    <li>
323
                </div>
324
                <div class="fg-row">
325
                    <div class="fg-label">
260
                        <label for="class">Class: </label>
326
                        <label for="class">Class: </label>
261
                        [% PROCESS 'av-build-dropbox.inc' name="class", category="PA_CLASS" default=attribute_type.class empty=1 %]
327
                    </div>
262
                        <div class="hint">
328
                    <div class="fg-input"> [% PROCESS 'av-build-dropbox.inc' name="class", category="PA_CLASS" default=attribute_type.class empty=1 %] </div>
263
                            [% IF ( CAN_user_parameters_manage_auth_values ) %]
329
                    <div class="hint">
264
                                Group attributes types with a block title (based on <a target="_blank" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=PA_CLASS">authorized values category 'PA_CLASS'</a>)
330
                        [% IF ( CAN_user_parameters_manage_auth_values ) %]
265
                            [% ELSE %]
331
                            Group attributes types with a block title (based on <a target="_blank" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=PA_CLASS">authorized values category 'PA_CLASS'</a>)
266
                                Group attributes types with a block title (based on authorized values category 'PA_CLASS')
332
                        [% ELSE %]
267
                            [% END %]
333
                            Group attributes types with a block title (based on authorized values category 'PA_CLASS')
268
                        </div>
334
                        [% END %]
269
                    </li>
335
                    </div>
270
                </ol>
336
                </div>
271
            </fieldset>
337
            </fieldset>
272
            <fieldset class="action">
338
            <fieldset class="action">
273
                <input type="submit" class="btn btn-primary" value="Save" />
339
                <input type="submit" class="btn btn-primary" value="Save" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt (-34 / +64 lines)
Lines 103-122 Link Here
103
            [% ELSE %]
103
            [% ELSE %]
104
                <h1>New restriction type</h1>
104
                <h1>New restriction type</h1>
105
            [% END %]
105
            [% END %]
106
            <fieldset class="rows">
106
            <fieldset class="fg">
107
                <ol>
107
                [% IF restriction %]
108
                    [% IF restriction %]
108
                    <div class="fg-row input-md">
109
                        <li>
109
                        <div class="fg-label">
110
                            <span class="label">Code: </span>[% restriction.code | html %]
110
                            <span class="label">Code: </span>
111
                        </div>
112
                        <div class="fg-text">
113
                            [% restriction.code | html %]
111
                            <input type="hidden" name="code" value="[% restriction.code | html %]" />
114
                            <input type="hidden" name="code" value="[% restriction.code | html %]" />
112
                        </li>
115
                        </div>
113
                        <li>
116
                    </div>
117
                    <div class="fg-row">
118
                        <div class="fg-label">
114
                            <label for="display_text" class="required">Label: </label>
119
                            <label for="display_text" class="required">Label: </label>
115
                            <input type="text" value="[% restriction.display_text | html %]" name="display_text" id="display_text" size="50" maxlength="50" class="required" required="required" />
120
                        </div>
116
                            <span class="required">Required</span>
121
                        <div class="fg-input">
117
                        </li>
122
                            <input type="text" value="[% restriction.display_text | html %]" name="display_text" id="display_text" maxlength="50" class="required" required="required" />
118
                        <li>
123
                        </div>
124
                        <div class="required">Required</div>
125
                    </div>
126
                    <div class="fg-row input-sm">
127
                        <div class="fg-label">
119
                            <label for="lift_after_payment" class="required">Lift after payment: </label>
128
                            <label for="lift_after_payment" class="required">Lift after payment: </label>
129
                        </div>
130
                        <div class="fg-input">
120
                            <select type="text" name="lift_after_payment" id="lift_after_payment">
131
                            <select type="text" name="lift_after_payment" id="lift_after_payment">
121
                                [% IF restriction.lift_after_payment %]
132
                                [% IF restriction.lift_after_payment %]
122
                                    <option value="0">No</option>
133
                                    <option value="0">No</option>
Lines 126-160 Link Here
126
                                    <option value="1">Yes</option>
137
                                    <option value="1">Yes</option>
127
                                [% END %]
138
                                [% END %]
128
                            </select>
139
                            </select>
129
                        </li>
140
                        </div>
130
                        <li>
141
                    </div>
142
                    <div class="fg-row">
143
                        <div class="fg-label">
131
                            <label for="fee_limit">Fee limit: </label>
144
                            <label for="fee_limit">Fee limit: </label>
132
                            <input type="text" value="[% restriction.fee_limit | html %]" inputmode="decimal" pattern="^\d+(\.\d{2})?$" min="0" name="fee_limit" id="fee_limit" />
145
                        </div>
133
                        </li>
146
                        <div class="fg-input">
134
                    [% ELSE %]
147
                            <input type="text" value="[% restriction.fee_limit | html %]" inputmode="decimal" pattern="^\d+(\.\d{2})?$" name="fee_limit" id="fee_limit" />
135
                        <li>
148
                        </div>
149
                    </div>
150
                [% ELSE %]
151
                    <div class="fg-row input-md">
152
                        <div class="fg-label">
136
                            <label for="code" class="required">Code: </label>
153
                            <label for="code" class="required">Code: </label>
137
                            <input type="text" name="code" id="code" size="50" maxlength="50" class="focus required type_input " required="required" />
154
                        </div>
138
                            <span class="required">Required</span>
155
                        <div class="fg-input">
139
                        </li>
156
                            <input type="text" name="code" id="code" maxlength="50" class="focus required type_input " required="required" />
140
                        <li>
157
                        </div>
158
                        <div class="required">Required</div>
159
                    </div>
160
                    <div class="fg-row">
161
                        <div class="fg-label">
141
                            <label for="display_text" class="required">Label: </label>
162
                            <label for="display_text" class="required">Label: </label>
142
                            <input type="text" name="display_text" id="display_text" size="50" maxlength="50" class="required" required="required" />
163
                        </div>
143
                            <span class="required">Required</span>
164
                        <div class="fg-input">
144
                        </li>
165
                            <input type="text" name="display_text" id="display_text" maxlength="50" class="required" required="required" />
145
                        <li>
166
                        </div>
167
                        <div class="required">Required</div>
168
                    </div>
169
                    <div class="fg-row input-sm">
170
                        <div class="fg-label">
146
                            <label for="lift_after_payment">Lift after payment: </label>
171
                            <label for="lift_after_payment">Lift after payment: </label>
147
                            <select type="text" name="lift_after_payment" id="lift_after_payment">
172
                        </div>
173
                        <div class="fg-input">
174
                            <select name="lift_after_payment" id="lift_after_payment">
148
                                <option value="0" selected="selected">No</option>
175
                                <option value="0" selected="selected">No</option>
149
                                <option value="1">Yes</option>
176
                                <option value="1">Yes</option>
150
                            </select>
177
                            </select>
151
                        </li>
178
                        </div>
152
                        <li>
179
                    </div>
180
                    <div class="fg-row">
181
                        <div class="fg-label">
153
                            <label for="fee_limit">Fee limit: </label>
182
                            <label for="fee_limit">Fee limit: </label>
154
                            <input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" min="0" name="fee_limit" id="fee_limit" />
183
                        </div>
155
                        </li>
184
                        <div class="fg-input">
156
                    [% END %]
185
                            <input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" name="fee_limit" id="fee_limit" />
157
                </ol>
186
                        </div>
187
                    </div>
188
                [% END %]
158
            </fieldset>
189
            </fieldset>
159
190
160
            <fieldset class="action">
191
            <fieldset class="action">
Lines 249-255 Link Here
249
        //Require fee limit if "Lift after payment" is set true
280
        //Require fee limit if "Lift after payment" is set true
250
        $("#lift_after_payment").on("change", function(){
281
        $("#lift_after_payment").on("change", function(){
251
            if($(this).val() == 1){
282
            if($(this).val() == 1){
252
                $("#fee_limit").prop("required",true).after('<span class="required">Required</span>');
283
                $divee_limit").prop("required",true).after('<span class="required">Required</div>');
253
            } else {
284
            } else {
254
                $("#fee_limit").prop("required",false).nextAll().remove();
285
                $("#fee_limit").prop("required",false).nextAll().remove();
255
            }
286
            }
256
- 

Return to bug 41841