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