5 [% INCLUDE 'doc-head-open.inc' %]
9 Modify system preference '[% searchfield | html %]'
11 Add a system preference
12 [% END %] › [% END %]
14 [% IF ( add_validate ) %]
15 Data added › [% END %]
17 [% IF ( delete_confirm ) %]
18 Confirm deletion of parameter '[% searchfield | html %]' › [% searchfield | html %] › [% END %]
20 [% IF ( delete_confirmed ) %]
21 Parameter deleted › [% END %]
23 System preferences › Administration › Koha
25 [% INCLUDE 'doc-head-close.inc' %]
28 <body id="admin_systempreferences" class="admin">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'prefs-admin-search.inc' %]
32 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
35 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
38 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
43 <a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a>
46 <a href="#" aria-current="page">
48 Modify system preference '[% searchfield | html %]'
50 Add a system preference
56 [% IF ( add_validate ) %]
58 <a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a>
61 <a href="#" aria-current="page">
67 [% IF ( delete_confirm ) %]
69 <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a>
72 <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=[% searchfield | uri %]">[% searchfield | html %]</a>
75 <a href="#" aria-current="page">
76 Confirm deletion of parameter '[% searchfield | html %]'
81 [% IF ( delete_confirmed ) %]
83 <a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a>
86 <a href="#" aria-current="page">
94 <a href="#" aria-current="page">
102 <div class="main container-fluid">
104 <div class="col-sm-10 col-sm-push-2">
107 [% IF ( add_form ) %]
108 [% IF ( type_upload ) %]
109 <form action="[% script_name | html %]" name="Aform" method="post" enctype="multipart/form-data">
111 <form action="[% script_name | html %]" name="Aform" method="post">
113 <fieldset class="rows"><legend>
114 [% IF ( modify ) %]Modify
116 [% END %] a system preference</legend><ol>
117 <li><label for="explanation">Explanation: </label><input type="text" name="explanation" id="explanation" size="60" value="[% explanation | html %]" /><input type="hidden" name="op" value="add_validate" /></li>
118 <li>[% IF ( searchfield ) %]<span class="label">Variable: </span>[% searchfield | html %]<input type="hidden" name="variable" value="[% searchfield | html %]" />
119 [% ELSE %]<label for="variable">Variable: </label><input type="text" name="variable" id="variable" size="60" />[% END %]</li>
120 <li><label for="value">Value: </label>
121 [% IF ( type_free ) %]
122 <textarea id="value" name="value" cols="[% fieldlength | html %]">[% value | html %]</textarea>
123 [% ELSIF ( type_upload ) %]
124 <input type="file" name="value" />
125 [% ELSIF ( type_textarea || type_htmlarea ) %]
126 [% IF ( type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
127 <textarea class="mce" name="value" id="value" rows="[% rows | html %]" cols="[% cols | html %]">[% value | html %]</textarea>
129 <textarea name="value" id="value" rows="[% rows | html %]" cols="[% cols | html %]">[% value | html %]</textarea>
131 [% ELSIF ( type_choice ) %]
132 <select name="value" id="value">
133 [% FOREACH option IN options %]
134 [% IF ( option.selected ) %]
135 <option value="[% option.option | html %]" selected="selected">
137 <option value="[% option.option | html %]">
138 [% END %][% option.option | html %]</option>
142 [% IF ( type_langselector ) %]
143 [% IF ( languages_loop ) %]
145 [% FOREACH languages_loo IN languages_loop %]
147 [% IF ( languages_loo.plural ) %]
148 [% IF ( languages_loo.native_description ) %][% languages_loo.native_description | html %][% ELSE %][% languages_loo.rfc4646_subtag | html %][% END %]
149 [% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]<table><tr><td>
150 [% IF ( sublanguages_loo.sublanguage_current ) %]
151 <label for="[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])
152 [% IF ( sublanguages_loo.enabled ) %]
153 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
155 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" />
160 <label for="[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])
161 [% IF ( sublanguages_loo.enabled ) %]
162 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
164 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" />
167 [% END %]</td></tr></table>
171 [% IF ( languages_loo.current ) %]
172 <label for="[% languages_loo.rfc4646_subtag | html %]">[% languages_loo.native_description | html %]([% languages_loo.rfc4646_subtag | html %])
173 [% IF ( languages_loo.group_enabled ) %]
174 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="[% languages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
176 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="[% languages_loo.rfc4646_subtag | html %]" type="checkbox" />
180 <label for="[% languages_loo.rfc4646_subtag | html %]">[% languages_loo.native_description | html %]([% languages_loo.rfc4646_subtag | html %])
181 [% IF ( languages_loo.group_enabled ) %]
182 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="[% languages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
184 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="[% languages_loo.rfc4646_subtag | html %]" type="checkbox" />
196 [% IF ( type_yesno ) %]
197 [% IF ( value_yes ) %]
198 <input type="radio" name="value" id="value" value="1" checked="checked" />[% ELSE %]<input type="radio" name="value" id="value" value="1" />
200 <label for="value" class="yesno">ON</label>
201 [% IF ( value_no ) %]
202 <input type="radio" name="value" id="value-no" value="0" checked="checked" />[% ELSE %]<input type="radio" name="value" id="value-no" value="0" />
204 <label for="value-no" class="yesno">OFF</label>
208 <fieldset class="action"><input type="submit" value="Save" />
209 [% IF ( return_tab ) %]
210 <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl?tab=[% return_tab | html %]">Cancel</a>
212 <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a>
216 <fieldset class="brief">
217 <legend>Koha internal</legend>
218 <div class="hint">Note: change the variable type to one of the dropdown values as needed</div>
220 <li><label for="preftype">Variable type:</label>
221 <select name="preftype" id="preftype">
222 [%- IF (preftype && preftype == 'Free') || !preftype -%]
223 <option value="Free" selected>Free</option>
225 <option value="Free">Free</option>
227 [%- IF (preftype && preftype == 'Choice') -%]
228 <option value="Choice" selected>Choice</option>
230 <option value="Choice">Choice</option>
232 [%- IF (preftype && preftype == 'YesNo') -%]
233 <option value="YesNo" selected>YesNo</option>
235 <option value="YesNo">YesNo</option>
237 [%- IF (preftype && preftype == 'Integer') -%]
238 <option value="Integer" selected>Integer</option>
240 <option value="Integer">Integer</option>
242 [%- IF (preftype && preftype == 'Textarea') -%]
243 <option value="Textarea" selected>Textarea</option>
245 <option value="Textarea">Textarea</option>
247 [%- IF (preftype && preftype == 'Htmlarea') -%]
248 <option value="Htmlarea" selected>Htmlarea</option>
250 <option value="Htmlarea">Htmlarea</option>
252 [%- IF (preftype && preftype == 'Float') -%]
253 <option value="Float" selected>Float</option>
255 <option value="Float">Float</option>
257 [%- IF (preftype && preftype == 'Themes') -%]
258 <option value="Themes" selected>Themes</option>
260 <option value="Themes">Themes</option>
262 [%- IF (preftype && preftype == 'Languages') -%]
263 <option value="Languages" selected>Languages</option>
265 <option value="Languages">Languages</option>
267 [%- IF (preftype && preftype == 'Upload') -%]
268 <option value="Upload" selected>Upload</option>
270 <option value="Upload">Upload</option>
272 [%- IF (preftype && preftype == 'ClassSources') -%]
273 <option value="ClassSources" selected>ClassSources</option>
275 <option value="ClassSources">ClassSources</option>
278 <li><label for="prefoptions">Variable options:</label>
279 <div class="hint">(a choice list for choice (separated by |) or cols|rows for texarea)</div>
280 <input type="text" name="prefoptions" id="prefoptions" value="[% prefoptions | html %]" size="60" maxlength="80" /></li>
286 [% IF ( add_validate ) %]
287 <h3>Data recorded</h3>
289 <form action="[% script_name | html %]" method="post">
290 <input type="submit" value="OK" />
294 [% IF ( delete_confirm ) %]
296 <caption>Confirm deletion of [% searchfield | html %]?</caption>
298 <th>Variable name:</th>
299 <td>[% searchfield | html %]</td>
301 <tr><th>Value: </th><td>
304 <form class="inline" action="[% script_name | html %]" method="post">
305 <input type="hidden" name="op" value="delete_confirmed" />
306 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
307 <input type="hidden" name="Tvalue" value="[% Tvalue | html %]" />
308 <input type="submit" value="Yes, delete" /></form>
309 <form class="inline" action="[% script_name | html %]" method="post"><input type="submit" value="No, do not delete" /></form>
312 [% IF ( delete_confirmed ) %]
313 <h3>Data deleted</h3>
314 <form action="[% script_name | html %]" method="post">
315 <input type="submit" value="Back to System Preferences" />
321 <div id="toolbar" class="btn-toolbar">
322 <a class="btn btn-default" id="newstopword" href="[% script_name | url %]?op=add_form"><i class="fa fa-plus"></i> New preference</a>
325 [% IF ( tab != 'local_use' ) %]
326 <p>Please click on one of the tabs at the left side of this form.</p>
329 <h1>Local use preferences</h1>
330 <table width="80%" id="sysprefst">
335 <th class="noExport">Actions</th>
338 <tbody>[% FOREACH loo IN loop %]
341 <td><strong><a href="[% loo.edit | url %]">[% loo.variable | html %]</a></strong></td><td> [% loo.explanation | html %]</td>
342 [% IF ( loo.oneline ) %]
343 <td class="single-line">
347 [% IF ( loo.type_upload ) %]
348 <form action="/cgi-bin/koha/admin/systempreferences.pl" method="post" enctype="multipart/form-data">
350 <form action="/cgi-bin/koha/admin/systempreferences.pl" method="post">
352 [% IF ( loo.type_free ) %]
353 <input type="text" name="value" size="[% loo.fieldlength | html %]" value="[% loo.value | html %]" />
355 [% IF ( loo.type_upload ) %]
356 <input type="file" name="value" value="[% loo.value | html %]" />
358 [% IF ( loo.type_textarea ) || ( loo.type_htmlarea ) %]
359 [% IF ( loo.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
360 <textarea class="mce" name="value" rows="[% loo.rows | html %]" cols="[% loo.cols | html %]">[% loo.value | html %]</textarea>
362 <a class="expand-textarea" style="display: none" href="#">Click to edit</a>
363 <textarea name="value" rows="[% loo.rows | html %]" cols="[% loo.cols | html %]">[% loo.value | html %]</textarea>
366 [% IF ( loo.type_choice ) %]
367 <select name="value">
368 [% FOREACH option IN loo.options %]
369 [% IF ( option.selected ) %]
370 <option value="[% option.option | html %]" selected="selected">
372 <option value="[% option.option | html %]">
373 [% END %][% option.option | html %]</option>
377 [% IF ( loo.type_langselector ) %]
378 [% IF ( loo.languages_loop ) %]
380 [% FOREACH languages_loo IN loo.languages_loop %]
382 [% IF ( languages_loo.plural ) %]
383 [% IF ( languages_loo.native_description ) %][% languages_loo.native_description | html %][% ELSE %][% languages_loo.rfc4646_subtag | html %][% END %]
384 [% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]<table><tr><td>
385 [% IF ( sublanguages_loo.sublanguage_current ) %]
386 <label for="[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])
387 [% IF ( sublanguages_loo.enabled ) %]
388 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
390 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" />
395 <label for="[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])
396 [% IF ( sublanguages_loo.enabled ) %]
397 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
399 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="value" id="[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" />
402 [% END %]</td></tr></table>
406 [% IF ( languages_loo.current ) %]
407 <label for="[% languages_loo.rfc4646_subtag | html %]">[% languages_loo.native_description | html %]([% languages_loo.rfc4646_subtag | html %])
408 [% IF ( languages_loo.group_enabled ) %]
409 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="opac[% languages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
411 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="opac[% languages_loo.rfc4646_subtag | html %]" type="checkbox" />
415 <label for="[% languages_loo.rfc4646_subtag | html %]">[% languages_loo.native_description | html %]([% languages_loo.rfc4646_subtag | html %])
416 [% IF ( languages_loo.group_enabled ) %]
417 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="opac[% languages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" />
419 <input value="[% languages_loo.rfc4646_subtag | html %]" name="value" id="opac[% languages_loo.rfc4646_subtag | html %]" type="checkbox" />
431 [% IF ( loo.type_yesno ) %]
432 [% IF ( loo.value_yes ) %]
433 <input type="radio" name="value" value="1" checked="checked" />[% ELSE %]<input type="radio" name="value" value="1" />
435 <label for="value" class="yesno">ON</label>
436 [% IF ( loo.value_no ) %]
437 <input type="radio" name="value" value="0" checked="checked" />[% ELSE %]<input type="radio" name="value" value="0" />
439 <label for="value-no" class="yesno">OFF</label>
441 <input type="hidden" name="op" value="add_validate" />
442 <input type="hidden" name="variable" value="[% loo.variable | html %]" />
443 <input type="hidden" name="prefoptions" value="[% loo.prefoptions | html %]" />
444 <input type="hidden" name="preftype" value="[% loo.type | html %]" />
445 <input type="hidden" name="explanation" value="[% loo.explanation | html %]" />
446 <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
450 <td class="actions"><a class="btn btn-default btn-xs" href="[% loo.edit | url %]"><i class="fa fa-pencil"></i> Edit</a> <a class="btn btn-default btn-xs" href="[% loo.delete | url %]"><i class="fa fa-trash"></i> Delete</a></td>
458 </div> <!-- /.col-sm-10.col-sm-push-2 -->
460 <div class="col-sm-2 col-sm-pull-10">
462 [% INCLUDE 'prefs-menu.inc' %]
464 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
465 </div> <!-- /.row -->
467 [% MACRO jsinclude BLOCK %]
468 [%# Add WYSIWYG editor for htmlarea system preferences %]
469 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
471 [% INCLUDE 'datatables.inc' %]
473 $(document).ready(function() {
474 [% IF ( loop ) %]$("#sysprefst").dataTable($.extend(true, {}, dataTablesDefaults, {
475 "sDom": '<"top pager"ilf>t',
477 { "aTargets": [ -1, -2, -3 ], "bSortable": false }
485 [% IF ( add_form ) %]
486 $(document).ready(function() {
487 $('.variabletype').css({ color: "#0000CC", cursor: "pointer" });
488 $('.variabletype').click(function() {
489 $('#preftype').attr("value",$(this).attr("id"));
493 // FIXME: many of these js functions appear unused
494 function isNotNull(f,noalert) {
495 if (f.value.length ==0) {
501 function isNum(v,maybenull) {
502 var n = new Number(v.value);
506 if (maybenull==0 && v.value=='') {
516 if (f.variable.value.length==0) {
517 _alertString += "\n- " + _("variable missing");
519 if (f.value.value.length==0) {
520 _alertString += "\n- " + _("value missing");
522 if (_alertString.length==0) {
523 document.Aform.submit();
525 alertString2 = _("Form not submitted because of the following problem(s)");
526 alertString2 += "\n------------------------------------------------------------------------------------\n";
527 alertString2 += _alertString;
532 $( '#sysprefst .expand-textarea' ).show().click( function () {
533 $( this ).hide().nextAll( 'textarea, input[type=submit]' ).show( 'slow' );
536 } ).nextAll( 'textarea, input[type=submit]' ).hide();
541 [% INCLUDE 'intranet-bottom.inc' %]