1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Administration › <!-- TMPL_IF name="add_form" --> System Preferences › <!-- 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 › Data Added<!-- /TMPL_IF -->
3 <!-- TMPL_IF name="delete_confirm" --> System Preferences › <!-- TMPL_VAR NAME="searchfield" --> › Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> System Preferences › 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">
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"));
15 // FIXME: many of these js functions appear unused
16 function isNotNull(f,noalert) {
17 if (f.value.length ==0) {
24 var x=f.value.toUpperCase();
29 function isNum(v,maybenull) {
30 var n = new Number(v.value);
34 if (maybenull==0 && v.value=='') {
41 var t = Date.parse(f.value);
51 if (f.variable.value.length==0) {
52 _alertString += "\n- " + _("variable missing");
54 if (f.value.value.length==0) {
55 _alertString += "\n- " + _("value missing");
57 if (_alertString.length==0) {
58 document.Aform.submit();
60 alertString2 = _("Form not submitted because of the following problem(s)");
61 alertString2 += "\n------------------------------------------------------------------------------------\n";
62 alertString2 += _alertString;
67 $( '#sysprefst .expand-textarea' ).show().click( function () {
68 $( this ).hide().nextAll( 'textarea, input[type=submit]' ).show( 'slow' );
71 } ).nextAll( 'textarea, input[type=submit]' ).hide();
77 <!-- TMPL_INCLUDE NAME="header.inc" -->
78 <!-- TMPL_INCLUDE NAME="sysprefs-admin-search.inc" -->
80 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF name="add_form" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › <!-- 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> › Data Added<!-- /TMPL_IF -->
81 <!-- TMPL_IF name="delete_confirm" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> › <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=<!-- TMPL_VAR NAME="searchfield" -->"><!-- TMPL_VAR NAME="searchfield" --></a> › 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> › Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></div>
83 <div id="doc3" class="yui-t2">
89 <!-- TMPL_IF NAME="add_form" -->
91 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post" <!-- TMPL_IF NAME="type_upload" -->enctype="multipart/form-data"<!-- /TMPL_IF -->>
93 <fieldset class="rows"><legend>
94 <!-- TMPL_IF NAME="modify" -->Modify
96 <!-- /TMPL_IF --> a system preference</legend><ol>
97 <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>
98 <li><!-- TMPL_IF NAME="searchfield" --><span class="label">Variable: </span><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->" />
99 <!-- TMPL_ELSE --><label for="variable">Variable: </label><input type="text" name="variable" id="variable" size="60" /><!-- /TMPL_IF --></li>
100 <li><label for="value">Value: </label>
101 <!-- TMPL_IF NAME="type_free" -->
102 <textarea id="value" name="value" cols="<!-- TMPL_VAR NAME="fieldlength" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
103 <!-- TMPL_ELSIF NAME="type_upload" -->
104 <input type="file" name="value" />
105 <!-- TMPL_ELSIF NAME="type_textarea" -->
106 <textarea name="value" id="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
107 <!-- TMPL_ELSIF NAME="type_choice" -->
108 <select name="value" id="value">
109 <!-- TMPL_LOOP NAME="options" -->
110 <!-- TMPL_IF NAME="selected" -->
111 <option value="<!-- TMPL_VAR NAME="option" -->" selected="selected">
113 <option value="<!-- TMPL_VAR NAME="option" -->">
114 <!-- /TMPL_IF --><!-- TMPL_VAR NAME="option" --></option>
118 <!-- TMPL_IF NAME="type_langselector" -->
119 <!-- TMPL_IF NAME="languages_loop" -->
121 <!-- TMPL_LOOP NAME="languages_loop" -->
123 <!-- TMPL_IF NAME="plural" -->
124 <!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
125 <!-- TMPL_LOOP NAME="sublanguages_loop" --><table><tr><td>
126 <!-- TMPL_IF NAME="sublanguage_current" -->
127 <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" -->)
128 <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>
131 <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" -->)
132 <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>
133 <!-- /TMPL_IF --></td></tr></table>
137 <!-- TMPL_IF NAME="current" -->
138 <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
139 <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>
141 <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
142 <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>
152 <!-- TMPL_IF NAME="type_yesno" -->
153 <!-- TMPL_IF NAME="value_yes" -->
154 <input type="radio" name="value" id="value" value="1" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" />
156 <label for="value" class="yesno">ON</label>
157 <!-- TMPL_IF NAME="value_no" -->
158 <input type="radio" name="value" id="value-no" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value-no" value="0" />
160 <label for="value-no" class="yesno">OFF</label>
164 <fieldset class="action"><input type="submit" value="Save" />
165 <!-- TMPL_IF name="return_tab" -->
166 <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl?tab=<!-- TMPL_VAR name="return_tab" -->">Cancel</a>
168 <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a>
172 <fieldset class="brief">
173 <legend>Koha internal</legend>
174 <div class="hint">Note: you should have no reasons to modify the following default values</div>
176 <li><label for="preftype">Variable type:</label>
177 <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>, <span class="variabletype" id="Upload">Upload</span> or <span class="variabletype" id="ClassSources">ClassSources</span>)</div>
178 <input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40" /></li>
179 <li><label for="prefoptions">Variable options:</label>
180 <div class="hint">(a choice list for Choice (separated by |) or cols|rows for Texarea)</div>
181 <input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" /></li>
187 <!-- TMPL_IF NAME="add_validate" -->
188 <h3>Data recorded</h3>
190 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
191 <input type="submit" value="OK" />
195 <!-- TMPL_IF NAME="delete_confirm" -->
197 <caption>Confirm Deletion of <!-- TMPL_VAR NAME="searchfield" -->?</caption>
199 <th>Variable Name:</th>
200 <td><!-- TMPL_VAR NAME="searchfield" --></td>
202 <tr><th>Value: </th><td>
203 <!-- TMPL_VAR NAME="Tvalue" -->
205 <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
206 <input type="hidden" name="op" value="delete_confirmed" />
207 <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
208 <input type="hidden" name="Tvalue" value="<!-- TMPL_VAR NAME="Tvalue" -->" />
209 <input type="submit" value="Yes, Delete" /></form>
210 <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete" /></form>
213 <!-- TMPL_IF NAME="delete_confirmed" -->
214 <h3>Data deleted</h3>
215 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
216 <input type="submit" value="Back to System Preferences" />
220 <!-- TMPL_IF NAME="else" -->
223 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
224 <script type="text/javascript">
226 // prepare DOM for YUI Toolbar
227 $(document).ready(function() {
229 <!-- TMPL_IF NAME="loop" -->$("#sysprefst").tablesorter({
231 headers: { 1: {sorter:false},2: { sorter: false },3: { sorter: false },4: { sorter: false }}
234 // YUI Toolbar Functions
235 function yuiToolbar() {
236 new YAHOO.widget.Button("newstopword");
240 <li><a id="newstopword" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Preference</a></li>
243 <h1>System preferences admin</h1>
244 <h2><!-- TMPL_VAR name="tab" --> preferences</h2>
245 <!-- TMPL_VAR NAME="searchfield" -->
246 <table width="80%" id="sysprefst">
254 <tbody><!-- TMPL_LOOP NAME="loop" -->
255 <!-- TMPL_UNLESS NAME="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
257 <td><strong><a href="<!-- TMPL_VAR NAME="edit" -->"><!-- TMPL_VAR NAME="variable" --></a></strong></td><td> <!-- TMPL_VAR NAME="explanation" ESCAPE="HTML" --></td>
258 <!-- TMPL_IF NAME="oneline" -->
259 <td class="single-line">
263 <form action="/cgi-bin/koha/admin/systempreferences.pl" method="post" <!-- TMPL_IF NAME="type_upload" -->enctype="multipart/form-data"<!-- /TMPL_IF -->>
265 <!-- TMPL_IF NAME="type_free" -->
266 <input type="text" name="value" size="<!-- TMPL_VAR NAME="fieldlength" -->" value="<!-- TMPL_VAR NAME="value" escape="HTML" -->" />
268 <!-- TMPL_IF NAME="type_upload" -->
269 <input type="file" name="value" value="<!-- TMPL_VAR NAME="value" escape="HTML" -->" />
271 <!-- TMPL_IF NAME="type_textarea" -->
272 <a class="expand-textarea" style="display: none" href="#">Click to Edit</a>
273 <textarea name="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
275 <!-- TMPL_IF NAME="type_choice" -->
276 <select name="value">
277 <!-- TMPL_LOOP NAME="options" -->
278 <!-- TMPL_IF NAME="selected" -->
279 <option value="<!-- TMPL_VAR NAME="option" -->" selected="selected">
281 <option value="<!-- TMPL_VAR NAME="option" -->">
282 <!-- /TMPL_IF --><!-- TMPL_VAR NAME="option" --></option>
286 <!-- TMPL_IF NAME="type_langselector" -->
287 <!-- TMPL_IF NAME="languages_loop" -->
289 <!-- TMPL_LOOP NAME="languages_loop" -->
291 <!-- TMPL_IF NAME="plural" -->
292 <!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
293 <!-- TMPL_LOOP NAME="sublanguages_loop" --><table><tr><td>
294 <!-- TMPL_IF NAME="sublanguage_current" -->
295 <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" -->)
296 <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>
299 <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" -->)
300 <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>
301 <!-- /TMPL_IF --></td></tr></table>
305 <!-- TMPL_IF NAME="current" -->
306 <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
307 <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="opac<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
309 <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
310 <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="opac<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
320 <!-- TMPL_IF NAME="type_yesno" -->
321 <!-- TMPL_IF NAME="value_yes" -->
322 <input type="radio" name="value" value="1" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" value="1" />
324 <label for="value" class="yesno">ON</label>
325 <!-- TMPL_IF NAME="value_no" -->
326 <input type="radio" name="value" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" value="0" />
328 <label for="value-no" class="yesno">OFF</label>
330 <input type="hidden" name="op" value="add_validate" />
331 <input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="variable" -->" />
332 <input type="hidden" name="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" escape="HTML" -->" />
333 <input type="hidden" name="preftype" value="<!-- TMPL_VAR NAME="type" -->" />
334 <input type="hidden" name="explanation" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->" />
335 <input type="submit" value="Save" />
339 <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit </a></td>
340 <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
342 <!-- /TMPL_LOOP --></tbody>
350 <!-- TMPL_INCLUDE NAME="prefs-menu.inc" -->
353 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->