7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>System preferences › Administration › Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/preferences.css") | $raw %]
11 [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.css") | $raw %]
12 [% Asset.css("css/humanmsg.css") | $raw %]
13 [% Asset.css("lib/codemirror/codemirror.min.css") | $raw %]
14 [% Asset.css("lib/codemirror/lint.min.css") | $raw %]
16 <body id="admin_preferences" class="admin">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'prefs-admin-search.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
29 <a href="#" aria-current="page">
36 <div class="main container-fluid">
38 <div class="col-sm-10 col-sm-push-2">
41 [% IF ( jump_not_found ) %]
42 <h2>System preferences</h2>
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 [% ELSIF searchfield %]
52 <h1>You searched for: [% searchfield | html %]</h1>
54 [% FOREACH TAB IN TABS %]
55 <div class="prefs-tab">
56 <h2>[% TAB.tab_title | html %] preferences</h2>
57 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
58 [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
59 <input type="hidden" name="op" value="save" />
60 <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
62 [% FOREACH LINE IN TAB.LINES %]
63 [% IF ( LINE.is_group_title ) %]
64 [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
66 <div class="col-sm-6">
67 <h3 id="[% LINE.title | $HtmlId %]"><i class="fa fa-caret-down"></i> [% LINE.title | html %]</h3>
69 <div class="col-sm-6">
70 [% IF ( searchfield ) %]
71 <div class="pull-right"><a class="btn btn-link" href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab_id | html %]#[% LINE.title | $HtmlId %]"><i class="fa fa-list-ul"></i> View all [% LINE.title | html %] preferences</a></div>
76 <table class="preferences" id="collapse_[% LINE.title | $HtmlId %]">
77 <thead><tr><th>Preference</th><th>Value</th></tr></thead>
78 [% UNLESS ( loop.last ) %]<tbody>[% END %]
80 [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
82 <td class="name-cell">
84 [% FOREACH NAME IN LINE.NAMES %]
85 <label for="pref_[% NAME.name | html %]" class="nowrap">
86 <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=[% NAME.name | uri %]">
87 <i class="fa fa-bookmark" aria-hidden="true"></i></a>
88 [% IF ( NAME.jumped ) %]
89 <span class="term" id="jumped">[% NAME.name | html %]</span>
90 [% ELSIF ( NAME.highlighted ) %]
91 <span class="term">[% NAME.name | html %]</span>
93 [% NAME.name | html %]
96 [% IF NAME.overridden %]
97 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
102 [% UNLESS ( loop.last ) %]<br />[% END %]
107 [% FOREACH CHUNK IN LINE.CHUNKS %]
108 [% IF ( CHUNK.type_text ) %]
109 [% CHUNK.contents | $raw %]
110 [% ELSIF ( CHUNK.type_input ) %]
111 [% IF CHUNK.name == 'UsageStatsGeolocation' %]
112 <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 %]
114 <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 %]
116 [% ELSIF ( CHUNK.type_select ) %]
117 [% IF CHUNK.disabled %]
118 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" disabled="disabled" class="preference preference-[% CHUNK.class or "choice" | html %]">
120 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
122 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
123 [% IF ( CHOICE.selected ) %]
124 <option value="[% CHOICE.value | html %]" selected="selected">
126 <option value="[% CHOICE.value | html %]">
128 [% CHOICE.text | html %]
132 [% ELSIF ( CHUNK.type_modalselect ) %]
133 <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-exclusions="[% CHUNK.exclusions | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
134 [% ELSIF ( CHUNK.type_multiple ) %]
135 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
136 [% FOREACH CHOICE IN CHUNK.CHOICES %][% IF ( CHOICE.selected ) %]<option value="[% CHOICE.value | html %]" selected="selected">[% ELSE %]<option value="[% CHOICE.value | html %]">[% END %][% CHOICE.text | html %]</option>[% END %]
138 [% ELSIF ( CHUNK.type_textarea )%]
139 [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
140 <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>
142 <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
143 <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>
144 <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>
146 [% ELSIF ( CHUNK.type_languages ) %]
147 <ul class="sortable">
148 [% FOREACH language IN CHUNK.languages %]
149 [% IF ( language.plural ) %]
151 [% IF ( language.native_description ) %]
152 [% language.native_description | html %]
154 [% language.rfc4646_subtag | html %]
156 [% IF language.sublanguages_loop.size > 0 %]
158 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
160 <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>
161 [% IF ( sublanguages_loo.enabled ) %]
162 <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"/>
164 <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"/>
167 [% END # FOREACH sublanguages %]
173 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label>
174 [% IF ( language.group_enabled ) %]
175 <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"/>
177 <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"/>
180 [% END # IF language.plural %]
181 [% END # FOREACH language %]
182 </ul> <!-- / ul.sortable -->
185 [% IF LINE.WARNINGS.size %]
186 [% FOR w IN LINE.WARNINGS %]
187 <div class="dialog alert">
189 [% CASE "bcrypt_config_not_set" %]Pseudonymization must only be turned on if the 'bcrypt_settings' configuration entry exists and is correctly filled in the Koha configuration file.
190 [% CASE %]Unknown warning "[% w | html %]"
197 [% IF ( loop.last ) %]</tbody></table>[% END %]
200 <fieldset class="action"><button class="save-all submit" 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>
206 </div> <!-- /.col-sm-10.col-sm-push-2 -->
208 <div class="col-sm-2 col-sm-pull-10">
210 [% INCLUDE 'prefs-menu.inc' %]
212 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
213 </div> <!-- /.row -->
216 <div class="modal" id="prefModal" tabindex="-1" role="dialog" aria-labelledby="prefModalLabel">
217 <div class="modal-dialog modal-wide" role="document">
218 <div class="modal-content">
219 <div class="modal-header">
220 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
221 <h4 class="modal-title" id="prefModalLabel">Modal title</h4>
223 <div class="modal-body">
225 <a href="#" id="select_all"><i class="fa fa-check"></i> Select all</a>
227 <a href="#" id="clear_all"><i class="fa fa-remove"></i> Clear all</a>
229 <form action="#" id="prefModalForm">
232 <div class="modal-footer">
233 <button id="saveModalPrefs" data-target="" type="button" class="btn btn-default">Save</button>
234 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
240 [% MACRO jsinclude BLOCK %]
241 [% INCLUDE 'datatables.inc' %]
242 [% Asset.js("lib/hc-sticky.js") | $raw %]
243 [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]
244 [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
245 [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %]
246 [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %]
247 [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
248 [% Asset.js( "lib/codemirror/yaml.min.js" ) | $raw %]
249 [% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
250 [% Asset.js( "lib/linters/jshint.min.js" ) | $raw %]
251 [% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
252 [% Asset.js( "lib/linters/csslint.min.js" ) | $raw %]
253 [% Asset.js( "lib/linters/js-yaml.min.js" ) | $raw %]
254 [% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
255 [% Asset.js( "lib/codemirror/javascript-lint.min.js" ) | $raw %]
256 [% Asset.js( "lib/codemirror/css-lint.min.js" ) | $raw %]
257 [% Asset.js( "lib/codemirror/yaml-lint.min.js" ) | $raw %]
261 var themelang = "[% themelang | html %]";
262 $(document).ready(function(){
263 [% UNLESS ( searchfield ) %]
264 Sticky = $("#toolbar");
267 stickyClass: "floating"
270 $("select[multiple='multiple']").multipleSelect( {
271 placeholder: _("Please select ..."),
272 selectAllText: _("Select all"),
273 allSelected: _("All selected"),
274 countSelected: _("# of % selected"),
275 noMatchesFound: _("No matches found")
277 $(".force_reload").on("click",function(e){
279 window.location.reload(true);
282 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
283 var to_highlight = "[% To.json( searchfield ) | $raw %]";
284 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
286 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
287 [% Asset.js("js/ajax.js") | $raw %]
288 [% Asset.js("js/pages/preferences.js") | $raw %]
289 [%# Add WYSIWYG editor for htmlarea system preferences %]
290 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
293 [% INCLUDE 'intranet-bottom.inc' %]