Bug 13618: Remove html filters at the intranet
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / preferences.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Administration &rsaquo; System preferences</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'datatables.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/preferences.css" />
8 [% IF ( bidi ) %]
9    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" />
10 [% END %]
11 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
12 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
13 <link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/plugins/multiple-select/multiple-select.css" />
14 <script type="text/javascript">
15 //<![CDATA[
16     [% UNLESS ( searchfield ) %]$(document).ready(function(){
17             $('#toolbar').fixFloat();
18         });[% END %]
19
20     $(document).ready(function(){
21         $("select[multiple='multiple']").multipleSelect( {
22             placeholder: _("Please select ..."),
23             selectAllText: _("Select all"),
24             allSelected: _("All selected"),
25             countSelected: _("# of % selected"),
26             noMatchesFound: _("No matches found")
27         } );
28     });
29     // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
30     var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]";
31     var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
32     var MSG_NOTHING_TO_SAVE = _("Nothing to save");
33     var MSG_SAVING = _("Saving...");
34     var MSG_SAVED_PREFERENCE = _("Saved preference %s");
35     var MSG_MODIFIED = _("modified");
36     var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
37     var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
38     var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
39     var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
40     var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
41     var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
42     var MSG_LOADING = _( "Loading..." );
43
44 //]]>
45 </script>
46 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/humanmsg.css" />
47 <script src="[% interface %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
48 <script src="[% themelang %]/js/ajax.js" type="text/javascript"></script>
49 <script src="[% themelang %]/js/pages/preferences.js" type="text/javascript"></script>
50 [%# Add WYSIWYG editor for htmlarea system preferences %]
51 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
52 </head>
53 <body id="admin_preferences" class="admin">
54 [% INCLUDE 'header.inc' %]
55 [% INCLUDE 'prefs-admin-search.inc' %]
56
57 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; System preferences</div>
58
59 <div id="doc3" class="yui-t2">
60
61    <div id="bd">
62     <div id="yui-main">
63             <div class="yui-b">
64
65     [% IF ( jump_not_found ) %]
66     <h2>System preferences</h2>
67     <div class="dialog alert">
68         Could not find a system preference named <code>[% jumpfield %]</code>.
69     </div>
70     [% END %]
71     [% IF ( search_not_found ) %]
72     <div class="dialog alert">
73         No system preferences matched your search for <strong>[% searchfield %]</strong>. You can try a different search or <a href="/cgi-bin/koha/admin/preferences.pl?tab=[% last_tab %]">return to where you were before.</a>
74     </div>
75     [% END %]
76     [% FOREACH TAB IN TABS %]
77     <div class="prefs-tab">
78     <h2>[% TAB.tab_title %] preferences</h2>
79     <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
80         [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button></div>[% END %]
81         <input type="hidden" name="op" value="save" />
82         <input type="hidden" name="tab" value="[% TAB.tab_id %]" />
83
84             [% FOREACH LINE IN TAB.LINES %]
85             [% IF ( LINE.is_group_title ) %]
86             [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
87             <h3>[% LINE.title %]</h3>
88             <table class="preferences">
89             <thead><tr><th>Preference</th><th>Value</th></tr></thead>
90             [% UNLESS ( loop.last ) %]<tbody>[% END %]
91             [% ELSE %]
92             [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
93             <tr class="name-row">
94                 <td class="name-cell">
95                     <code>
96                         [% FOREACH NAME IN LINE.NAMES %]
97                                                 <label for="pref_[% NAME.name %]">
98                                                         [% IF ( NAME.jumped ) %]
99                                                         <span class="term" id="jumped">[% NAME.name %]</span>
100                             [% ELSIF ( NAME.highlighted ) %]
101                                                         <span class="term">[% NAME.name %]</span>
102                                                         [% ELSE %]
103                                                         [% NAME.name %]
104                                                         [% END %]
105
106                             [% IF NAME.overridden %]
107                                 <span class="overridden" title="The system preference [% NAME.name %] may have been overridden from this value by one or more virtual hosts.">
108                                     [Overridden]
109                                 </span>
110                             [% END %]
111                                                 </label>
112                         [% UNLESS ( loop.last ) %]<br />[% END %]
113                         [% END %]
114                     </code>
115                 </td>
116                 <td><div>
117                     [% FOREACH CHUNK IN LINE.CHUNKS %]
118                     [% IF ( CHUNK.type_text ) %]
119                     [% CHUNK.contents %]
120                     [% ELSIF ( CHUNK.type_input ) %]
121                     <input type="[%IF CHUNK.input_type %][% CHUNK.input_type %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %]" value="[% CHUNK.value %]" autocomplete="off" /> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %]
122                     [% ELSIF ( CHUNK.type_select ) %]
123                     <select name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "choice" %]">
124                         [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
125                         [% IF ( CHOICE.selected ) %]
126                         <option value="[% CHOICE.value %]" selected="selected">
127                         [% ELSE %]
128                         <option value="[% CHOICE.value %]">
129                         [% END %]
130                             [% CHOICE.text %]
131                         </option>
132                         [% END %]
133                     </select>
134                     [% ELSIF ( CHUNK.type_multiple ) %]
135                     <select name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "choice" %]" multiple="multiple">
136                         [% FOREACH CHOICE IN CHUNK.CHOICES %][% IF ( CHOICE.selected ) %]<option value="[% CHOICE.value %]" selected="selected">[% ELSE %]<option value="[% CHOICE.value %]">[% END %][% CHOICE.text %]</option>[% END %]
137                     </select>
138                     [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%]
139                         [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
140                         <textarea name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %] mce" rows="20" cols="60">[% CHUNK.value %]</textarea>
141                         [% ELSE %]
142                         <a class="expand-textarea" style="display: none" href="#">Click to Edit</a>
143                         <textarea name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %]" rows="10" cols="40">[% CHUNK.value %]</textarea>
144                         <a class="collapse-textarea" style="display:none" href="#">Click to collapse</br></a>
145                         [% END %]
146                     [% ELSIF ( CHUNK.type_languages ) %]
147                     <dl>
148                     [% FOREACH language IN CHUNK.languages %]
149                         [% IF ( language.plural ) %]
150                         <dt>
151                             [% IF ( language.native_description ) %][% language.native_description %][% ELSE %][% language.rfc4646_subtag %][% END %]
152                         </dt>
153                         [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
154                         <dd>
155                             <label for="pref_[% CHUNK.name %]_[% sublanguages_loo.rfc4646_subtag %]">[% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %]([% sublanguages_loo.rfc4646_subtag %])</label>
156                             [% IF ( sublanguages_loo.enabled ) %]
157                             <input value="[% sublanguages_loo.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% sublanguages_loo.rfc4646_subtag %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
158                             [% ELSE %]
159                             <input value="[% sublanguages_loo.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% sublanguages_loo.rfc4646_subtag %]" type="checkbox" class="preference preference-checkbox"/>
160                             [% END %]
161                         </dd>
162                         [% END %]
163                         [% ELSE %]
164                         <dt>
165                             <label for="pref_[% CHUNK.name %]_[% language.rfc4646_subtag %]">[% language.native_description %]([% language.rfc4646_subtag %])</label>
166                             [% IF ( language.group_enabled ) %]
167                             <input value="[% language.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% language.rfc4646_subtag %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
168                             [% ELSE %]
169                             <input value="[% language.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% language.rfc4646_subtag %]" type="checkbox" class="preference preference-checkbox"/>
170                             [% END %]
171                         </dt>
172                         [% END %]
173                     [% END %]
174                     </dl>
175                     [% END %]
176                     [% END %]
177                 </div></td>
178             </tr>
179             [% IF ( loop.last ) %]</tbody></table>[% END %]
180             [% END %]
181         [% END %]
182         <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="#" onclick="window.location.reload(true);" class="cancel">Cancel</a></fieldset>
183     </form>
184     </div>
185     [% END %]
186 </div>
187 </div>
188 <div class="yui-b">
189 [% INCLUDE 'prefs-menu.inc' %]
190 </div>
191 </div>
192 [% INCLUDE 'intranet-bottom.inc' %]