bugfix - HTML escape syspref explanation
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / systempreferences.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; <!-- TMPL_IF name="add_form" --> System Preferences &rsaquo; <!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" --> System Preferences &rsaquo; Data Added<!-- /TMPL_IF -->
3 <!-- TMPL_IF name="delete_confirm" --> System Preferences &rsaquo; <!-- TMPL_VAR NAME="searchfield" --> &rsaquo; Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> System Preferences &rsaquo; Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></title>
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <script type="text/javascript">
6 //<![CDATA[
7 <!-- TMPL_IF NAME="add_form" -->
8     $(document).ready(function() {
9         $('.variabletype').css({ color: "#0000CC", cursor: "pointer" });
10         $('.variabletype').click(function() {
11             $('#preftype').attr("value",$(this).attr("id"));
12         });
13     });
14 <!-- /TMPL_IF -->
15         //
16         function isNotNull(f,noalert) {
17             if (f.value.length ==0) {
18     return false;
19             }
20             return true;
21         }
22         //
23         function toUC(f) {
24             var x=f.value.toUpperCase();
25             f.value=x;
26             return true;
27         }
28         //
29         function isNum(v,maybenull) {
30         var n = new Number(v.value);
31         if (isNaN(n)) {
32             return false;
33             }
34         if (maybenull==0 && v.value=='') {
35             return false;
36         }
37         return true;
38         }
39         //
40         function isDate(f) {
41             var t = Date.parse(f.value);
42             if (isNaN(t)) {
43                 return false;
44             }
45         }
46         //
47         function Check(f) {
48             var ok=1;
49             var _alertString="";
50             var alertString2;
51             if (f.variable.value.length==0) {
52                 _alertString += "\n- " + _("variable missing");
53             }
54             if (f.value.value.length==0) {
55                 _alertString += "\n- " + _("value missing");
56             }
57             if (_alertString.length==0) {
58                 document.Aform.submit();
59             } else {
60                 alertString2  = _("Form not submitted because of the following problem(s)");
61                 alertString2 += "\n------------------------------------------------------------------------------------\n";
62                 alertString2 += _alertString;
63                 alert(alertString2);
64             }
65         }
66         //]]>
67 </script>
68 </head>
69 <body>
70 <!-- TMPL_INCLUDE NAME="header.inc" -->
71 <!-- TMPL_INCLUDE NAME="sysprefs-admin-search.inc" -->
72
73 <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; <!-- TMPL_IF name="add_form" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Data Added<!-- /TMPL_IF -->
74 <!-- TMPL_IF name="delete_confirm" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=<!-- TMPL_VAR NAME="searchfield" -->"><!-- TMPL_VAR NAME="searchfield" --></a> &rsaquo; Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></div>
75
76 <div id="doc3" class="yui-t2">
77    
78    <div id="bd">
79     <div id="yui-main">
80     <div class="yui-b">
81
82 <!-- TMPL_IF NAME="add_form" -->
83     
84         
85         <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
86                 
87         <fieldset class="rows"><legend><!-- TMPL_IF NAME="modify" -->
88             Modify a system preference
89         <!-- TMPL_ELSE -->
90             Add a system preference
91         <!-- /TMPL_IF --></legend><ol>
92             <li><label for="explanation">Explanation: </label><input type="text" name="explanation" id="explanation" size="60" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->" /><input type="hidden" name="op" value="add_validate" /></li>
93             <li><!-- TMPL_IF NAME="searchfield" --><span class="label">Variable: </span><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->" />
94             <!-- TMPL_ELSE --><label for="variable">Variable: </label><input type="text" name="variable" id="variable" size="60" /><!-- /TMPL_IF --></li>
95             <li><label for="value">Value: </label><!-- TMPL_IF NAME="type-free" -->
96                     <textarea id="value" name="value" cols="<!-- TMPL_VAR NAME="fieldlength" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
97                 <!-- /TMPL_IF -->
98                 <!-- TMPL_IF NAME="type-textarea" -->
99                     <textarea name="value" id="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
100                 <!-- /TMPL_IF -->
101                 <!-- TMPL_IF NAME="type-choice" -->
102                     <select name="value" id="value">
103                         <!-- TMPL_LOOP NAME="options" -->
104                             <!-- TMPL_IF NAME="selected" -->
105                                 <option value="<!-- TMPL_VAR NAME="option" -->" selected="selected">
106                             <!-- TMPL_ELSE -->
107                                 <option value="<!-- TMPL_VAR NAME="option" -->">
108                             <!-- /TMPL_IF --><!-- TMPL_VAR NAME="option" --></option>
109                         <!-- /TMPL_LOOP -->
110                     </select>
111                 <!-- /TMPL_IF -->
112         <!-- TMPL_IF NAME="type-langselector" -->
113         <!-- TMPL_IF NAME="languages_loop" -->
114         <table>
115         <!-- TMPL_LOOP NAME="languages_loop" -->
116             <tr><td>
117             <!-- TMPL_IF NAME="plural" -->
118             <!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
119             <!-- TMPL_LOOP NAME="sublanguages_loop" --><table><tr><td>
120                 <!-- TMPL_IF NAME="sublanguage_current" -->
121                     <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
122                     <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
123
124                 <!-- TMPL_ELSE -->
125                     <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
126                     <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
127                 <!-- /TMPL_IF --></td></tr></table>
128             <!-- /TMPL_LOOP -->
129
130             <!-- TMPL_ELSE -->
131                 <!-- TMPL_IF NAME="current" -->
132             <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
133                     <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
134                 <!-- TMPL_ELSE -->
135             <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
136                     <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
137                 <!-- /TMPL_IF -->
138             <!-- /TMPL_IF -->
139             </td></tr>
140         <!-- /TMPL_LOOP -->
141         </table>
142         <!-- /TMPL_IF -->
143
144         <!-- /TMPL_IF -->
145
146                 <!-- TMPL_IF NAME="type-yesno" -->
147                     <!-- TMPL_IF NAME="value-yes" -->
148                     <input type="radio" name="value" id="value" value="1" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" /><!-- /TMPL_IF --> <label for="value" class="yesno">ON</label>
149                 <!-- TMPL_IF NAME="value-no" -->    
150                     <input type="radio" name="value" id="value-no" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value-no" value="0" /><!-- /TMPL_IF --> <label for="value-no" class="yesno">OFF</label><!-- /TMPL_IF -->
151                 </li>
152         </ol></fieldset>
153         <fieldset class="action"><input type="submit" value="Save" /> 
154           <!-- TMPL_IF name="return_tab" -->
155             <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl?tab=<!-- TMPL_VAR name="return_tab" -->">Cancel</a>
156           <!-- TMPL_ELSE -->
157             <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a>
158           <!-- /TMPL_IF -->
159         </fieldset>
160         
161         <fieldset class="brief">
162         <legend>Koha internal</legend>
163         <div class="hint">Note: you should have no reasons to modify the following default values</div>
164         <ol>
165         <li><label for="preftype">Variable type:</label>
166         <div class="hint"> (<span class="variabletype" id="Choice">Choice</span>, <span class="variabletype" id="YesNo">YesNo</span>, <span class="variabletype" id="Integer">Integer</span>, <span class="variabletype" id="Textarea">Textarea</span>, <span class="variabletype" id="Float">Float</span>, <span class="variabletype" id="Themes">Themes</span>, <span class="variabletype" id="Languages">Languages</span>, or <span class="variabletype" id="ClassSources">ClassSources</span>)</div>
167         <input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40" /></li>
168         <li><label for="prefoptions">Variable options:</label>
169         <div class="hint">(a choice list for Choice (separated by |) or cols|rows for Texarea)</div>
170         <input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" /></li>
171         </ol>
172         </fieldset>
173         </form>
174     <!-- /TMPL_IF -->
175     
176     <!-- TMPL_IF NAME="add_validate" -->
177     
178
179         <h3>Data recorded</h3>
180         
181         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
182         <input type="submit" value="OK" />
183         </form>
184     <!-- /TMPL_IF -->
185     
186     <!-- TMPL_IF NAME="delete_confirm" -->
187     
188     <table>
189         <caption>Confirm Deletion of <!-- TMPL_VAR NAME="searchfield" -->?</caption>
190         <tr>
191             <th>Variable Name:</th>
192             <td><!-- TMPL_VAR NAME="searchfield" --></td>
193         </tr>
194         <tr><th>Value: </th><td>
195         <!-- TMPL_VAR NAME="Tvalue" -->
196         </td></tr></table>
197         <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
198                 <input type="hidden" name="op" value="delete_confirmed" />
199                 <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
200                 <input type="hidden" name="Tvalue" value="<!-- TMPL_VAR NAME="Tvalue" -->" />
201         <input type="submit"  value="Yes, Delete" /></form> 
202                 <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete" /></form>
203     
204     
205     <!-- /TMPL_IF -->
206     
207     <!-- TMPL_IF NAME="delete_confirmed" -->
208     
209         <h3>Data deleted</h3>
210         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
211         <input type="submit" value="Back to System Preferences" />
212         </form>
213     <!-- /TMPL_IF -->
214    
215     <!-- TMPL_IF NAME="else" -->
216     
217     <div id="toolbar">
218         <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
219     <script type="text/javascript">
220     //<![CDATA[
221     // prepare DOM for YUI Toolbar
222      $(document).ready(function() {
223         yuiToolbar();
224                 <!-- TMPL_IF NAME="loop" -->$("#sysprefst").tablesorter({
225                         sortList: [[0,0]],
226                         headers: { 1: {sorter:false},2: { sorter: false },3: { sorter: false },4: { sorter: false }}
227                 });<!-- /TMPL_IF -->
228      });
229     // YUI Toolbar Functions
230     function yuiToolbar() {
231         new YAHOO.widget.Button("newstopword");
232     }   //]]>
233     </script>
234     <ul class="toolbar">
235     <li><a id="newstopword" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Preference</a></li>
236 </ul></div>
237     
238     <h1>System preferences admin</h1>
239     <h2><!-- TMPL_VAR name="tab" --> preferences</h2>
240     <!-- TMPL_VAR NAME="searchfield" -->
241     <table width="80%" id="sysprefst">
242 <thead>    <tr>
243         <th>Preference</th>
244         <th>Explanation</th>
245         <th>Value</th>
246         <th>Edit</th>
247         <th>Delete</th>
248     </tr></thead>
249     <tbody><!-- TMPL_LOOP NAME="loop" -->
250     <tr<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
251
252         <td><strong><a href="<!-- TMPL_VAR NAME="edit" -->"><!-- TMPL_VAR NAME="variable" --></a></strong></td><td> <!-- TMPL_VAR NAME="explanation" ESCAPE="HTML" --></td>
253         <td><!-- TMPL_IF NAME="yesno" -->
254         <!-- TMPL_IF NAME="yes" -->ON<!-- TMPL_ELSE -->OFF<!-- /TMPL_IF -->
255         <!-- TMPL_ELSE --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF --></td>
256
257         <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit </a></td>
258         <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
259     </tr>
260     <!-- /TMPL_LOOP --></tbody>
261     </table>
262     
263     <!-- /TMPL_IF -->
264
265 </div>
266 </div>
267 <div class="yui-b">
268 <!-- TMPL_INCLUDE NAME="sysprefs-menu.inc" -->
269 </div>
270 </div>
271 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->