6 [% PROCESS 'i18n.inc' %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10 [% t("System preferences") | html %] ›
11 [% t("Administration") | html %] ›
12 [% t("Koha") | html %]
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
16 [% Asset.css("css/preferences.css") | $raw %]
17 [% Asset.css("css/humanmsg.css") | $raw %]
18 [% Asset.css("lib/codemirror/codemirror.min.css") | $raw %]
19 [% Asset.css("lib/codemirror/lint.min.css") | $raw %]
21 <body id="admin_preferences" class="admin">
22 [% WRAPPER 'header.inc' %]
23 [% INCLUDE 'prefs-admin-search.inc' %]
26 [% WRAPPER 'sub-header.inc' %]
27 [% WRAPPER breadcrumbs %]
28 [% WRAPPER breadcrumb_item %]
29 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
31 [% WRAPPER breadcrumb_item bc_active= 1 %]
32 <span>System preferences</span>
34 [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
42 [% IF ( jump_not_found ) %]
43 <div class="dialog alert">
44 Could not find a system preference named <code>[% jumpfield | html %]</code>.
47 [% IF ( search_not_found ) %]
48 <div class="dialog alert">
49 No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
51 <h1>System preferences</h1>
52 [% ELSIF searchfield %]
53 <h1>System preferences matching: [% searchfield | html %]</h1>
55 <h1>System preferences</h1>
57 [% FOREACH TAB IN TABS %]
58 <div class="prefs-tab">
59 <h2>[% TAB.tab_title | html %] preferences</h2>
60 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
61 [% INCLUDE 'csrf-token.inc' %]
62 [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all btn btn-primary" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
63 <input type="hidden" name="op" value="save" />
64 <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
66 [% FOREACH LINE IN TAB.LINES %]
67 [% IF ( LINE.is_group_title ) %]
68 [% UNLESS ( loop.first ) %]</tbody></table></div>[% END %]
69 <div class="page-section">
71 <div class="col-sm-6">
72 <h3 id="[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"><i class="fa fa-caret-down"></i> [% LINE.title | html %]</h3>
74 <div class="col-sm-6">
75 [% IF ( searchfield ) %]
76 <div class="pull-right"><a class="btn btn-link" href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab_id | html %]#[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"><i class="fa fa-list-ul"></i> View all [% LINE.title | html %] preferences</a></div>
81 <table class="preferences" id="collapse_[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]">
82 <thead><tr><th>Preference</th><th>Value</th></tr></thead>
83 [% UNLESS ( loop.last ) %]<tbody>[% END %]
85 [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
87 <td class="name-cell">
89 [% FOREACH NAME IN LINE.NAMES %]
90 <label for="pref_[% NAME.name | html %]" class="nowrap">
91 <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=[% NAME.name | uri %]">
92 <i class="fa fa-bookmark" aria-hidden="true"></i></a>
93 [% IF ( NAME.jumped ) %]
94 <span class="term" id="jumped">[% NAME.name | html %]</span>
95 [% ELSIF ( NAME.highlighted ) %]
96 <span class="term">[% NAME.name | html %]</span>
98 [% NAME.name | html %]
101 [% IF NAME.overridden %]
102 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
107 [% UNLESS ( loop.last ) %]<br />[% END %]
112 [% FOREACH CHUNK IN LINE.CHUNKS %]
113 [% IF ( CHUNK.type_text ) %]
114 [% CHUNK.contents | $raw %]
115 [% ELSIF ( CHUNK.type_input ) %]
116 [% IF CHUNK.name == 'UsageStatsGeolocation' %]
117 <input type="[%IF CHUNK.input_type %][% CHUNK.input_type | html %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" value="[% CHUNK.value | html %]" autocomplete="off" readonly="readonly" size="40" style="width: auto;"/> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %]
119 <input type="[%IF CHUNK.input_type %][% CHUNK.input_type | html %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" value="[% CHUNK.value | html %]" autocomplete="off" /> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %]
121 [% ELSIF ( CHUNK.type_select ) %]
122 [% IF CHUNK.disabled %]
123 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" disabled="disabled" class="preference preference-[% CHUNK.class or "choice" | html %]">
125 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
127 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
128 [% IF ( CHOICE.selected ) %]
129 <option value="[% CHOICE.value | html %]" selected="selected">
131 <option value="[% CHOICE.value | html %]">
133 [% CHOICE.text | html %]
137 [% ELSIF ( CHUNK.type_modalselect ) %]
138 <input type="text" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="modalselect preference preference-[% CHUNK.type | html %]" data-source="[% CHUNK.source | html %]" data-required="[% CHUNK.required | html %]" data-exclusions="[% CHUNK.exclusions | html %]" data-inclusions="[% CHUNK.inclusions | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
139 [% ELSIF ( CHUNK.type_modaljs ) %]
140 <input type="text" name="pref_[% CHUNK.name | html %]" data-initiator="[% CHUNK.initiator | html %]" data-processor="[% CHUNK.processor | html %]" id="pref_[% CHUNK.name | html %]" class="modaljs preference preference-[% CHUNK.type | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
141 [% ELSIF ( CHUNK.type_multiple ) %]
142 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
143 [% FOREACH CHOICE IN CHUNK.CHOICES %]
144 [% IF ( CHOICE.selected ) %]
145 <option value="[% CHOICE.value | html %]" selected="selected">
147 <option value="[% CHOICE.value | html %]">
149 [% CHOICE.text | html %]
153 [% ELSIF ( CHUNK.type_textarea )%]
154 [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
155 <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] mce" rows="20" cols="60">[% CHUNK.value | html %]</textarea>
157 <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
158 <textarea style="display:none" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] codemirror" rows="10" cols="40">[% CHUNK.value | html %]</textarea>
159 <a class="collapse-textarea" id="collapse_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" style="display:none" href="#">Click to collapse</br></a>
161 [% ELSIF ( CHUNK.type_languages ) %]
162 <ul class="sortable">
163 [% FOREACH language IN CHUNK.languages %]
164 [% IF ( language.plural ) %]
165 <li><i class="fa-solid fa-fw fa-grip-vertical" aria-hidden="true" style="color:#B7B7B7"></i>
166 [% IF ( language.native_description ) %]
167 [% language.native_description | html %]
169 [% language.rfc4646_subtag | html %]
171 [% IF language.sublanguages_loop.size > 0 %]
173 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
175 <label for="pref_[% CHUNK.name | html %]_[% 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 %])</label>
176 [% IF ( sublanguages_loo.enabled ) %]
177 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
179 <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/>
182 [% END # FOREACH sublanguages %]
187 <li><i class="fa-solid fa-fw fa-grip-vertical" aria-hidden="true" style="color:#B7B7B7"></i>
188 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label>
189 [% IF ( language.group_enabled ) %]
190 <input value="[% language.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
192 <input value="[% language.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/>
195 [% END # IF language.plural %]
196 [% END # FOREACH language %]
197 </ul> <!-- / ul.sortable -->
200 [% IF LINE.WARNINGS.size %]
201 [% FOR w IN LINE.WARNINGS %]
202 <div class="dialog alert">
204 [% CASE "bcrypt_config_not_set" %]<span>Pseudonymization must only be turned on if the 'bcrypt_settings' configuration entry exists and is correctly filled in the Koha configuration file.</span>
205 [% CASE %]<span>Unknown warning "[% w | html %]"</span>
212 [% IF ( loop.last ) %]</tbody></table></div>[% END %]
215 <fieldset class="action"><button class="save-all submit btn btn-primary" type="submit">Save all [% TAB.tab_title | html %] preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl" class="force_reload cancel">Cancel</a></fieldset>
221 </div> <!-- /.col-sm-10.col-sm-push-2 -->
223 <div class="col-sm-2 col-sm-pull-10">
225 [% INCLUDE 'prefs-menu.inc' %]
227 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
228 </div> <!-- /.row -->
231 <div class="modal" id="prefModal" tabindex="-1" role="dialog" aria-labelledby="prefModalLabel">
232 <div class="modal-dialog modal-wide" role="document">
233 <div class="modal-content">
234 <div class="modal-header">
235 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
236 <h4 class="modal-title" id="prefModalLabel">Modal title</h4>
238 <div class="modal-body">
240 <a href="#" id="select_all"><i class="fa fa-check"></i> Select all</a>
242 <a href="#" id="clear_all"><i class="fa fa-times"></i> Clear all</a>
244 <form action="#" id="prefModalForm">
247 <div class="modal-footer">
248 <button id="saveModalPrefs" data-target="" type="button" class="btn btn-primary">Save</button>
249 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
255 [% MACRO jsinclude BLOCK %]
256 [% INCLUDE 'datatables.inc' %]
257 [% Asset.js("lib/hc-sticky.js") | $raw %]
258 [% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %]
259 [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
260 [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %]
261 [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %]
262 [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
263 [% Asset.js( "lib/codemirror/yaml.min.js" ) | $raw %]
264 [% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
265 [% Asset.js( "lib/linters/jshint.min.js" ) | $raw %]
266 [% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
267 [% Asset.js( "lib/linters/csslint.min.js" ) | $raw %]
268 [% Asset.js( "lib/linters/js-yaml.min.js" ) | $raw %]
269 [% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
270 [% Asset.js( "lib/codemirror/javascript-lint.min.js" ) | $raw %]
271 [% Asset.js( "lib/codemirror/css-lint.min.js" ) | $raw %]
272 [% Asset.js( "lib/codemirror/yaml-lint.min.js" ) | $raw %]
273 [% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %]
277 var themelang = "[% themelang | html %]";
278 $(document).ready(function(){
279 [% UNLESS ( searchfield ) %]
280 Sticky = $("#toolbar");
283 stickyClass: "floating"
286 $("select[multiple='multiple']").multipleSelect( {
287 placeholder: _("Please select ..."),
288 selectAllText: _("Select all"),
289 allSelected: _("All selected"),
290 countSelected: _("# of % selected"),
291 noMatchesFound: _("No matches found")
293 $(".force_reload").on("click",function(e){
295 window.location.reload(true);
298 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
299 var to_highlight = "[% To.json( searchfield ) | html %]";
300 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
301 var db_columns = [% To.json( db_columns ) | $raw %];
304 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
305 [% Asset.js("js/ajax.js") | $raw %]
306 [% Asset.js("js/pages/preferences.js") | $raw %]
307 [%# Add WYSIWYG editor for htmlarea system preferences %]
308 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
311 [% INCLUDE 'intranet-bottom.inc' %]