improving systempref selector :
[koha.git] / koha-tmpl / intranet-tmpl / default / en / parameters / systempreferences.tmpl
1 <!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
2 <div id="mainbloc">
3         <script language="JavaScript" type="text/javascript">
4                 function _(s) { return s } // dummy function for gettext
5                 //
6                 function isNotNull(f,noalert) {
7                         if (f.value.length ==0) {
8         return false;
9                         }
10                         return true;
11                 }
12                 //
13                 function toUC(f) {
14                         var x=f.value.toUpperCase();
15                         f.value=x;
16                         return true;
17                 }
18                 //
19                 function isNum(v,maybenull) {
20                 var n = new Number(v.value);
21                 if (isNaN(n)) {
22                         return false;
23                         }
24                 if (maybenull==0 && v.value=='') {
25                         return false;
26                 }
27                 return true;
28                 }
29                 //
30                 function isDate(f) {
31                         var t = Date.parse(f.value);
32                         if (isNaN(t)) {
33                                 return false;
34                         }
35                 }
36                 //
37                 function Check(f) {
38                         var ok=1;
39                         var _alertString="";
40                         var alertString2;
41                         if (f.variable.value.length==0) {
42                                 _alertString += "\n- " + _("variable missing");
43                         }
44                         if (f.value.value.length==0) {
45                                 _alertString += "\n- " + _("value missing");
46                         }
47                         if (_alertString.length==0) {
48                                 document.Aform.submit();
49                         } else {
50                                 alertString2  = _("Form not submitted because of the following problem(s)");
51                                 alertString2 += "\n------------------------------------------------------------------------------------\n";
52                                 alertString2 += _alertString;
53                                 alert(alertString2);
54                         }
55                 }
56                 </script>
57         
58         <!-- TMPL_IF NAME="add_form" -->
59         
60                 <!-- TMPL_IF NAME="modify" -->
61                         <h1>Modify a system preference</h1>
62                 <!-- TMPL_ELSE -->
63                         <h1>Add a system preference</h1>
64                 <!-- /TMPL_IF -->
65                 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
66                 <div id="bloc25">
67                         <h2 class="parameters"><input type="text" name="explanation" size="60" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->"></h2>
68                         <input type="hidden" name="op" value="add_validate">
69                         <p>
70                         <!-- TMPL_IF NAME="searchfield" -->
71                                 <label>Variable</label><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->">
72                         <!-- TMPL_ELSE -->
73                                 <label>Variable</label><input type="text" name="variable" size="60">
74                         <!-- /TMPL_IF -->
75                         </p>
76                         <p><label>Value</label>
77                                 <!-- TMPL_IF NAME="type-free" -->
78                                         <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" escape="HTML" -->" size="<!-- TMPL_VAR NAME="fieldlength" -->">
79                                 <!-- /TMPL_IF -->
80                                 <!-- TMPL_IF NAME="type-textarea" -->
81                                         <textarea name="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
82                                 <!-- /TMPL_IF -->
83                                 <!-- TMPL_IF NAME="type-choice" -->
84                                         <select name="value">
85                                                 <!-- TMPL_LOOP NAME="options" -->
86                                                         <option value="<!-- TMPL_VAR NAME="option" -->" <!-- TMPL_IF NAME="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="option" --></option>
87                                                 <!-- /TMPL_LOOP -->
88                                         </select>
89                                 <!-- /TMPL_IF -->
90                                 <!-- TMPL_IF NAME="type-yesno" -->
91                                         <input type="radio" name="value" value="1"<!-- TMPL_IF NAME="value-yes" --> checked<!-- /TMPL_IF -->>Yes
92                                         <input type="radio" name="value" value="0"<!-- TMPL_IF NAME="value-no" --> checked<!-- /TMPL_IF -->>No
93                                 <!-- /TMPL_IF -->
94         
95                         </p>
96                         <p><label>&nbsp;</label><input type="submit" value="OK" class="button"></p>
97                 </div>
98                 <div id="bloc25">
99                         <h2 class="parameters">Koha internal (you should have no reasons to modify the following default values)</h2>
100                         <p>Variable type: <input type="text" name="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40"> (Choice, YesNo,Integer,Textarea,Float,Themes,Languages)</p>
101                         Variable options :<input type="text" name="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="80" maxlength="80"> (choice list for Choice (separated by |) and cols|rows for Texarea)
102                 </div>
103                 </form>
104         <!-- /TMPL_IF -->
105         
106         <!-- TMPL_IF NAME="add_validate" -->
107         
108                 Data recorded
109                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
110                 <input type="submit" value="OK">
111                 </form>
112         <!-- /TMPL_IF -->
113         
114         <!-- TMPL_IF NAME="delete_confirm" -->
115         
116         <table border="0" cellspacing="0" cellpadding="2">
117                 <tr valign="top" bgcolor="#99cc33">
118                         <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif"><b>Variable</b></td>
119                         <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif"><b><!-- TMPL_VAR NAME="searchfield" --></b></td>
120                 </tr>
121                 <tr><td>Value</td><td><!-- TMPL_VAR NAME="Tvalue" --></td></tr>
122                 <form 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" -->">
123                 <tr><td colspan="2" align="center">CONFIRM DELETION</td></tr>
124                 <tr><td><input type="submit" value="YES"></form></td><td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="NO"></form></td></tr>
125         </table>
126         
127         <!-- /TMPL_IF -->
128         
129         <!-- TMPL_IF NAME="delete_confirmed" -->
130         
131                 Data deleted
132                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
133                 <input type="submit" value="OK">
134                 </form>
135         <!-- /TMPL_IF -->
136         
137         <!-- TMPL_IF NAME="else" -->
138         <h1>System preferences admin</h1>
139         <table>
140                 <tr>
141                         <td>
142                                 <!-- TMPL_IF name="Admin" -->
143                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin" class="button">Admin</a>
144                                 <!-- TMPL_ELSE -->
145                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin">Admin</a>
146                                 <!-- /TMPL_IF -->
147                         </td>
148                         <td>
149                                 <!-- TMPL_IF name="Acquisitions" -->
150                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions" class="button">Acquisitions</a>
151                                 <!-- TMPL_ELSE -->
152                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions">Acquisitions</a>
153                                 <!-- /TMPL_IF -->
154                         </td>
155                         <td>
156                                 <!-- TMPL_IF name="Authorities" -->
157                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities" class="button">Authorities</a>
158                                 <!-- TMPL_ELSE -->
159                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities</a>
160                                 <!-- /TMPL_IF -->
161                         </td>
162                         <td>
163                                 <!-- TMPL_IF name="Catalogue" -->
164                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue" class="button">Catalogue</a>
165                                 <!-- TMPL_ELSE -->
166                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue">Catalogue</a>
167                                 <!-- /TMPL_IF -->
168                         </td>
169                         <td>
170                                 <!-- TMPL_IF name="Circulation" -->
171                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation" class="button">Circulation</a>
172                                 <!-- TMPL_ELSE -->
173                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation</a>
174                                 <!-- /TMPL_IF -->
175                         </td>
176                         <td>
177                                 <!-- TMPL_IF name="Members" -->
178                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members" class="button">Members</a>
179                                 <!-- TMPL_ELSE -->
180                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members">Members</a>
181                                 <!-- /TMPL_IF -->
182                         </td>
183                         <td>
184                                 <!-- TMPL_IF name="OPAC" -->
185                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC" class="button">OPAC</a>
186                                 <!-- TMPL_ELSE -->
187                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC</a>
188                                 <!-- /TMPL_IF -->
189                         </td>
190                         <td>
191                                 <!-- TMPL_IF name="Others" -->
192                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=" class="button">Others</a>
193                                 <!-- TMPL_ELSE -->
194                                         <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=">Others</a>
195                                 <!-- /TMPL_IF -->
196                         </td>
197                 </tr>
198         </table>
199         <!-- TMPL_VAR NAME="searchfield" -->
200         <table border="0" cellspacing="0" cellpadding="2">
201         <tr valign="top" bgcolor="#99cc33">
202                 <th>Variable</th>
203                 <th>Value</th>
204                 <th colspan="3">Explanation</th>
205         </tr>
206         <!-- TMPL_LOOP NAME="loop" -->
207         <!-- TMPL_IF NAME="toggle" --><tr valign="top" class="hilighted"><!-- TMPL_ELSE --><tr valign="top"><!-- /TMPL_IF -->
208                 <td><!-- TMPL_VAR NAME="variable" --></td>
209                 <td><!-- TMPL_VAR NAME="value" --></td>
210                 <td><!-- TMPL_VAR NAME="explanation" --></td>
211                 <td><a href="<!-- TMPL_VAR NAME="edit" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0"><br>Edit</a></td>
212                 <td><a href="<!-- TMPL_VAR NAME="delete" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0"><br>Delete</a></td>
213         </tr>
214         <!-- /TMPL_LOOP -->
215         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
216         <input type="hidden" name="op" value="add_form">
217         </table>
218         <table width="40%">
219                 <tr>
220                         <td width="50%"><!-- TMPL_VAR NAME="previous" --></td>
221                         <td width="50%"><!-- TMPL_VAR NAME="next" --></td>
222                 </tr>
223         </table>
224         </form>
225         
226         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
227                 <input type="hidden" name="op" value="add_form">
228                 <input type="submit" class="button" value="Add System preference">
229         </form>
230         
231         <!-- /TMPL_IF -->
232 </div>
233
234 <!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->