forgot to update the SD TiVo Settings in template
[pyTivo/wgw.git] / plugins / admin / templates / settings.tmpl
blob08e86301aa01cd3a691b40b413f3d44c7a0b56b7
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
2 <html>\r
3 <head>\r
4         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
5         <title>pyTivo Web Configuration</title>\r
6         <script language="javascript" type="text/javascript">\r
7                 function fillBlank(){\r
8                         var texts=document.getElementsByTagName('input');\r
9                         for (var i_tem = 0; i_tem < texts.length; i_tem++){\r
10                                 if (texts[i_tem].value==''){\r
11                                         texts[i_tem].value=' ';\r
12                                 }\r
13                         }\r
14                 }\r
15                 function switchDiv(pass, type){ \r
16                         hideallids(type);\r
17                         showDiv(pass);\r
18                 }\r
19                 function hideallids(type){\r
20                         //loop through the array and hide each element by id\r
21                         var divs = document.getElementsByTagName('div');\r
22                         for (var i=0;i<divs.length;i++){\r
23                                 if(divs[i].id.match(type)){\r
24                                         hideDiv(divs[i].id);\r
25                                 }\r
26                         } \r
27                 }\r
28                 function hideDiv(pass) {\r
29                         var divs = document.getElementsByTagName('div');\r
30                         for(i=0;i<divs.length;i++){\r
31                                 if(divs[i].id.match(pass)){//if they are 'see' divs\r
32                                         if (document.getElementById){// DOM3 = IE5, NS6\r
33                                                 divs[i].style.visibility="hidden";// show/hide\r
34                                         }\r
35                                         else{\r
36                                                 if (document.layers){ // Netscape 4\r
37                                                         document.layers[divs[i]].display = 'hidden';\r
38                                                 }\r
39                                                 else{ // IE 4\r
40                                                         document.all.hideshow.divs[i].visibility = 'hidden';\r
41                                                 }\r
42                                         }\r
43                                 }\r
44                         }\r
45                 }\r
46                 function showDiv(pass) {\r
47                         var divs = document.getElementsByTagName('div');\r
48                         for(i=0;i<divs.length;i++){\r
49                                 if(divs[i].id == pass){\r
50                                         if (document.getElementById){\r
51                                                 divs[i].style.visibility="";\r
52                                         }\r
53                                         else {\r
54                                                 if (document.layers){ // Netscape 4\r
55                                                         document.layers[divs[i]].display = '';\r
56                                                 }\r
57                                                 else{ // IE 4\r
58                                                         document.all.hideshow.divs[i].visibility = '';\r
59                                                 }\r
60                                         }\r
61                                 }\r
62                         }\r
63                 }\r
64                 function deleteSection(id){\r
65                         if (select_section.section.options[id].text == 'Global Server Settings'){\r
66                                 alert('Delete Error:\n\nSorry the Global Server Settings Section is required for pyTivo to run and cannot be deleted');\r
67                                 return true;\r
68                         }\r
69                         var name = select_section.section.options[id].text;\r
70                         var answer = confirm("Are you sure you wish to delete the '" + name + "' Section?")\r
71                         if (answer){\r
72                                 switchDiv('set-delete', 'set-');\r
73                                 select_section.section.options[id] = null;\r
74                                 var field = document.getElementById(name).value;\r
75                                 document.getElementById(field).value = 'Delete_Me';\r
76                                 saveNotify();\r
77                                 return true;\r
78                         }               \r
79                 }\r
80                 function resetpyTivo(){\r
81                         var answer = confirm("Are you sure you wish to reset the pyTivo Server? Any unsaved changes will be lost!")\r
82                         if (answer){\r
83                                 window.location="/TiVoConnect?Command=Reset&Container=$quote($container)"\r
84                         }\r
85                 }\r
86                 function showData(form) {\r
87                         var section = ""\r
88                         var setting = ""\r
89                         re=/[\[\]<>|]/;\r
90                         inputs = form.getElementsByTagName("input");\r
91                         for (i = 0; i < inputs.length; i++){\r
92                                 if (inputs[i].type == 'text' && re.exec(inputs[i].value)){\r
93                                         setting = inputs[i].name;\r
94                                         break;\r
95                                 }\r
96                         }\r
97                         if (setting != ""){\r
98                                 var map = document.getElementById('Section_Map').value.split(']');\r
99                                 map.pop();\r
100                                 splitSetting = setting.split('.');\r
101                                 for(i=0;i<map.length;i++){\r
102                                         key = map[i].split('|');\r
103                                         //buffer += key[0] + "---" + key[1] + "===" + splitSetting[0] + "\n";\r
104                                         if (splitSetting[0] == 'Server'){\r
105                                                 section = 'server';\r
106                                                 break;\r
107                                         }\r
108                                         if (key[0] == splitSetting[0]){\r
109                                                 section = key[1];\r
110                                                 break;\r
111                                         }\r
112                                 }\r
113                                 alert("Invalid Entry:\nSorry these are not allowed \n[]<>|");\r
114                                 switchDiv('set-' + section, 'set-');\r
115                                 document.getElementById(setting).select();\r
116                                 return false;\r
117                         }\r
118                         fillBlank();\r
119                         document.config.submit();\r
120                 }\r
121                 function saveNotify(){\r
122                         document.getElementById('B1').style.fontWeight= 'bold';\r
123                         document.getElementById('B2').disabled = true;\r
124                 }\r
125         </script>\r
126 </head>\r
127 <body style="background-color: rgb(250, 250, 250);">\r
129 <p align="center"><font size="6">pyTivo Web\r
130 Configuration</font> <a href="javascript:switchDiv('help-instructions', 'help-');">help</a></p>\r
131 <center>\r
132 <table style="border: 1px solid rgb(220, 220, 220);background-color: rgb(255, 255, 255);text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="4">\r
134   <tbody>\r
136     <tr>\r
138       <td style="border-right: 1px dotted rgb(153, 153, 153); vertical-align: top;">\r
139       <div id="leftframe" style="position: relative; text-align: center; width: 200px;">\r
140       <form name="select_section">Sections\r
141         <select name="section" size="7">\r
142         <option value="set-server">Global Server Settings</option>\r
143         <option value="set-hd_tivos">HD TiVo Settings</option>\r
144         <option value="set-sd_tivos">SD TiVo Settings</option>\r
145 #for $name, $data in $shares_data\r
146         <option value="set-$name">$name</option>\r
147 #end for\r
148 #for $name, $data in $tivos_data\r
149         <option value="set-$name">$name</option>\r
150 #end for\r
151         </select>\r
153         <input name="B3" value="Edit Section" type="button" onclick="switchDiv(select_section.section.options[select_section.section.selectedIndex].value, 'set-');return true;"> \r
154         <input name="B4" value="Delete Section" type="button" onclick="deleteSection(select_section.section.selectedIndex)">\r
155         <input name="B5" value="Add Section" type="button" onclick="switchDiv('set-add', 'set-');return true;"></form>\r
157       <hr>Administration\r
158       <form method="post">\r
159         <p align="center"><input name="B1" id="B1" value="Save Changes" type="button" onclick="showData(document.config);return true;">\r
160         <input id="B2" name="B2" value="Soft Reset pyTivo" type="button" onclick="resetpyTivo();"></p>\r
162       </form>\r
164 <a href="javascript:alert('This feature is not available yet');">View Raw File</a> </div>\r
166       </td>\r
168       <td style="vertical-align: top;">\r
169       <div id="settings" style="width: 300px; overflow: scroll; height: 450px; position: relative;">\r
170       <form name="config" method="GET" action="TiVoConnect" onsubmit="fillBlank();showData(this);">\r
171       <input type="hidden" name="Command" value="UpdateSettings">\r
172       <input type="hidden" name="Container" value="$container">\r
173 <div id="set-server" style="width: 280px; text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
174         <b>Global Server Settings</b><br>\r
175         <hr style="width: 100%; height: 2px;"> \r
176         <table align="center">\r
177 #set $i = 0\r
178 #for $key in $server_known\r
179 #set $i += 1\r
180 #if $i%2\r
181 <tr style="background-color: rgb(250, 250, 250);">\r
182 #else\r
183 <tr>\r
184 #end if\r
185 <td>\r
186 #if $key in $server_data\r
187         $key :</td><td><input size="20" id="Server.$key" name="Server.$key" value="$server_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
189 #else\r
190         $key :</td><td><input size="20" id="Server.$key" name="Server.$key" value="" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
192 #end if\r
193 </td></tr>\r
194 #end for\r
195 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr>        \r
196 #set $i = 0\r
197 #for $key in $server_data \r
198         #if not $key in $server_known\r
199                 #set $i += 1\r
200                 #if $i%2\r
201                         <tr style="background-color: rgb(250, 250, 250);">\r
202                 #else\r
203                         <tr>\r
204                 #end if\r
205                 <td>         $key :</td><td>\r
206                 <input size="20" id="Server.$key" name="Server.$key" value="$server_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
207                 </td></tr>\r
208         #end if \r
209 #end for \r
210         </table>\r
211         <div style="width: 280px; position: relative;">\r
212                 <div id="add-server-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
213                         <br>\r
214                         <center>\r
215                         <input type="button" value="Add Setting" onclick="switchDiv('add-server-field', 'add-server-');return true;">\r
216                         </center>\r
217                 </div>\r
218                 <div id="add-server-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
219                         <table style="width: 265px;">\r
220                         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
221                         <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
222                         <tr><td><input size="16" id="Server.new_settting" name="Server.new__setting" onChange="saveNotify();" type="text" value=""></td><td><input size="16" type="text" onChange="saveNotify();" id="Server.new_value"  name="Server.new__value" value=""></td></tr>\r
223                         </table>\r
224                 </div>\r
225         </div>\r
226 </div>\r
228 <div id="set-hd_tivos" style="width: 280px; text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
229         <b>HD TiVo Settings</b><br>\r
230         <hr style="width: 100%; height: 2px;"> \r
231         <table align="center">\r
232 #set $i = 0\r
233 #for $key in $hd_tivos_known\r
234 #set $i += 1\r
235 #if $i%2\r
236 <tr style="background-color: rgb(250, 250, 250);">\r
237 #else\r
238 <tr>\r
239 #end if\r
240 <td>\r
241 #if $key in $hd_tivos_data\r
242         $key :</td><td><input size="20" id="_tivo_HD.$key" name="_tivo_HD.$key" value="$hd_tivos_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
244 #else\r
245         $key :</td><td><input size="20" id="_tivo_HD.$key" name="_tivo_HD.$key" value="" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
247 #end if\r
248 </td></tr>\r
249 #end for\r
250 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr>        \r
251 #set $i = 0\r
252 #for $key in $hd_tivos_data \r
253         #if not $key in $hd_tivos_known\r
254                 #set $i += 1\r
255                 #if $i%2\r
256                         <tr style="background-color: rgb(250, 250, 250);">\r
257                 #else\r
258                         <tr>\r
259                 #end if\r
260                 <td>         $key :</td><td>\r
261                 <input size="20" id="_tivo_HD.$key" name="_tivo_HD.$key" value="$hd_tivos_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
262                 </td></tr>\r
263         #end if \r
264 #end for \r
265         </table>\r
266         <div style="width: 280px; position: relative;">\r
267                 <div id="add-hd_tivos-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
268                         <br>\r
269                         <center>\r
270                         <input type="button" value="Add Setting" onclick="switchDiv('add-hd_tivos-field', 'add-hd_tivos-');return true;">\r
271                         </center>\r
272                 </div>\r
273                 <div id="add-hd_tivos-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
274                         <table style="width: 265px;">\r
275                         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
276                         <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
277                         <tr><td><input size="16" id="_tivo_HD.new_settting" name="_tivo_HD.new__setting" onChange="saveNotify();" type="text" value=""></td><td><input size="16" type="text" onChange="saveNotify();" id="_tivo_HD.new_value"  name="_tivo_HD.new__value" value=""></td></tr>\r
278                         </table>\r
279                 </div>\r
280         </div>\r
281 </div>\r
283 <div id="set-sd_tivos" style="width: 280px; text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
284         <b>SD TiVo Settings</b><br>\r
285         <hr style="width: 100%; height: 2px;"> \r
286         <table align="center">\r
287 #set $i = 0\r
288 #for $key in $sd_tivos_known\r
289 #set $i += 1\r
290 #if $i%2\r
291 <tr style="background-color: rgb(250, 250, 250);">\r
292 #else\r
293 <tr>\r
294 #end if\r
295 <td>\r
296 #if $key in $sd_tivos_data\r
297         $key :</td><td><input size="20" id="_tivo_SD.$key" name="_tivo_SD.$key" value="$sd_tivos_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
299 #else\r
300         $key :</td><td><input size="20" id="_tivo_SD.$key" name="_tivo_SD.$key" value="" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
302 #end if\r
303 </td></tr>\r
304 #end for\r
305 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr>        \r
306 #set $i = 0\r
307 #for $key in $sd_tivos_data \r
308         #if not $key in $sd_tivos_known\r
309                 #set $i += 1\r
310                 #if $i%2\r
311                         <tr style="background-color: rgb(250, 250, 250);">\r
312                 #else\r
313                         <tr>\r
314                 #end if\r
315                 <td>         $key :</td><td>\r
316                 <input size="20" id="_tivo_SD.$key" name="_tivo_SD.$key" value="$sd_tivos_data[$key]" onChange="saveNotify();" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
317                 </td></tr>\r
318         #end if \r
319 #end for \r
320         </table>\r
321         <div style="width: 280px; position: relative;">\r
322                 <div id="add-sd_tivos-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
323                         <br>\r
324                         <center>\r
325                         <input type="button" value="Add Setting" onclick="switchDiv('add-sd_tivos-field', 'add-sd_tivos-');return true;">\r
326                         </center>\r
327                 </div>\r
328                 <div id="add-sd_tivos-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
329                         <table style="width: 265px;">\r
330                         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
331                         <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
332                         <tr><td><input size="16" id="_tivo_SD.new_settting" name="_tivo_SD.new__setting" onChange="saveNotify();" type="text" value=""></td><td><input size="16" type="text" onChange="saveNotify();" id="_tivo_SD.new_value"  name="_tivo_SD.new__value" value=""></td></tr>\r
333                         </table>\r
334                 </div>\r
335         </div>\r
336 </div>\r
338 #set $section_count = 0\r
339 #set $section_map = ''\r
340 #for $name, $data in $shares_data\r
341         #set $section_count += 1\r
342         #set $section_number = 'section-' + str($section_count)\r
343         <input type="hidden" name="$name" id="$name" value="$section_number">\r
344         #set $section_map += $section_number + '|' + $name + ']'\r
345         <div id="set-$name" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
346         [<input size="20" onChange="saveNotify();" id="$section_number" name="$section_number" value="$name">]<br>\r
347         <hr style="width: 100%; height: 2px;"><table align="center">\r
348         #set $i = 0\r
349         #for $key in $shares_known\r
350                 #set $i += 1\r
351                 #if $i%2\r
352                         <tr style="background-color: rgb(250, 250, 250);">\r
353                 #else\r
354                         <tr>\r
355                 #end if\r
356                 #if $key in $data\r
357                         <td>$key :</td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
358                         </td>\r
359                 #else\r
360                         <td>$key : </td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
361                         </td>\r
362                 #end if\r
363                 </tr>\r
364         #end for\r
366         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr> \r
367         #set $i = 0\r
368         #for $key in $data \r
369                 #if not $key in $shares_known\r
370                         #set $i += 1\r
371                         #if $i%2\r
372                                 <tr style="background-color: rgb(250, 250, 250);">\r
373                         #else\r
374                                 <tr>\r
375                         #end if\r
376                         <td> $key : </td><td>\r
377                         <input size="20" onChange="saveNotify();" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
378                         </td></tr>\r
379                 #end if \r
380         #end for\r
381         </table>\r
382                 <div style="position: relative;">\r
383                         <div id="add-$name-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
384                                 <br>\r
385                                 <center>\r
386                                 <input type="button" value="Add Setting" onclick="switchDiv('add-$name-field', 'add-$name-');return true;">\r
387                                 </center>\r
388                         </div>\r
389                         <div id="add-$name-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
390                                 <table style="width: 265px;">\r
391                                 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
392                                 <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
393                                 <tr><td><input onChange="saveNotify();" size="16" id="$(section_number).new__setting" name="$(section_number).new__setting" type="text" value=""></td><td><input onChange="saveNotify();" size="16" type="text" id="$(section_number).new__value" name="$(section_number).new__value" value=""></td></tr>\r
394                                 </table>\r
395                         </div>\r
396                 </div>\r
397         </div>\r
398 #end for\r
400 #for $name, $data in $tivos_data\r
401         #set $section_count += 1\r
402         #set $section_number = 'section-' + str($section_count)\r
403         <input type="hidden" name="$name" id="$name" value="$section_number">\r
404         #set $section_map += $section_number + '|' + $name + ']'\r
405         <div id="set-$name" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
406         [<input size="20" onChange="saveNotify();" id="$section_number" name="$section_number" value="$name">]<br>\r
407         <hr style="width: 100%; height: 2px;"><table align="center">\r
408         #set $i = 0\r
409         #for $key in $tivos_known\r
410                 #set $i += 1\r
411                 #if $i%2\r
412                         <tr style="background-color: rgb(250, 250, 250);">\r
413                 #else\r
414                         <tr>\r
415                 #end if\r
416                 #if $key in $data\r
417                         <td>$key :</td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
418                         </td>\r
419                 #else\r
420                         <td>$key :</td><td><input onChange="saveNotify();" size="20" id="$section_number.$key" name="$section_number.$key" value="" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
421                         </td>\r
422                 #end if\r
423                 </tr>\r
424         #end for\r
426         <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">User Defined Settings:</td></tr> \r
427         #set $i = 0\r
428         #for $key in $data \r
429                 #if not $key in $tivos_known\r
430                         #set $i += 1\r
431                         #if $i%2\r
432                                 <tr style="background-color: rgb(250, 250, 250);">\r
433                         #else\r
434                                 <tr>\r
435                         #end if\r
436                         <td> $key :</td><td> \r
437                         <input size="20" onChange="saveNotify();" id="$section_number.$key" name="$section_number.$key" value="$data[$key]" onfocus="switchDiv('help-$key', 'help-');return true;" type="text">\r
438                         </td></tr>\r
439                 #end if \r
440         #end for\r
441         </table>\r
442                 <div style="position: relative;">\r
443                         <div id="add-$name-button" style="width: 280px; position: absolute; position: absolute; left: 0px; top: 0px;">\r
444                                 <br>\r
445                                 <center>\r
446                                 <input type="button" value="Add Setting" onclick="switchDiv('add-$name-field', 'add-$name-');return true;">\r
447                                 </center>\r
448                         </div>\r
449                         <div id="add-$name-field" style="position: absolute; position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
450                                 <table style="width: 265px;">\r
451                                 <tr><td colspan="2" align="center" style="border-bottom: 1px solid rgb(153, 153, 153);">Add a Setting</td></tr>\r
452                                 <tr><td>Setting Name:</td><td>Setting Value:</td></tr>\r
453                                 <tr><td><input onChange="saveNotify();" size="16" id="$(section_number).new__setting" name="$(section_number).new__setting" type="text" value=""></td><td><input onChange="saveNotify();" size="16" type="text" id="$(section_number).new__value" name="$(section_number).new__value" value=""></td></tr>\r
454                                 </table>\r
455                         </div>\r
456                 </div>\r
457         </div>\r
458 #end for\r
459 <div id="set-add" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
460         Add a New Section\r
461         <hr>\r
462         <table>\r
463         <tr>\r
464         <td> Section Name :</td><td> \r
465                 <input onChange="saveNotify();" type="text" size="20" name="new_Section" value="" onfocus="switchDiv('help-add', 'help-');return true;">\r
466         </td></tr></table>\r
467         The new section name will be added to the pyTivo.conf file when you click <b>Save Changes</b>.\r
468 </div>\r
469 <div id="set-delete" style="text-align: center;position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
470         Delete a Section\r
471         <hr>\r
472         <br>\r
473         The Section has been marked for deletion. However it will not be actually deleted until you click the <b>Save Changes</b> button.\r
474 </div>\r
475 <input type="hidden" id="Section_Map" name="Section_Map" value="$section_map">\r
476       </form>\r
478       </div>\r
480       </td>\r
482       <td style="border-left: 1px dotted rgb(153, 153, 153); vertical-align: top;">\r
483       <div id="sidesections" style="width: 400px; position: relative;"><!-- HELP SECTIONS -->\r
484       <div id="help-instructions" style="visibility: visible; width: 400px; overflow: scroll; height: 450px; position: absolute; left: 0px; top: 0px;">\r
485       <p align="center"><strong>Instructions</strong>\r
486       </p>\r
487       <b>To Edit a Share:</b><br>\r
488       Select the share in the left hand menu and click edit.<br><br>\r
489       \r
490       <b>To Delete a Share</b><br>\r
491       Select the share in the left hand menu and click delete.<br><br>\r
492       \r
493       <b>To Add a Share/Tivo/Section</b><br>\r
494       Click the add section button.  Then provide the name of the share or TiVo. You must save your \r
495       changes before you can edit settings in the new share.<br><br>\r
496       \r
497       <b>To Add a Setting</b><br>\r
498       Select you share first.  If the setting is a known setting simply add the value to the appropriate setting.\r
499       If the setting is not listed you can add a "User Defined Setting".  Simple click add setting and provide\r
500       the name and value of this new setting.<br><br>\r
501       \r
502       <b>To Delete a Setting</b><br>\r
503       Delete the value of the setting so that it is blank.  If this is a known share the name will remain after a save.\r
504       If the setting is a user defined setting the name will be deleted after the save.<br><br>\r
505       \r
506       <b>Save Settings</b><br>\r
507       Clicking Save Settings will write your changes to the pyTivo.conf file.  These settings will not have an effect on\r
508       your pyTivo server until it is Soft Reset or restarted.<br><br>\r
509       \r
510       <b>Soft Reset</b><br>\r
511       Soft Reset allows your new settings to take effect without manually restarting the TiVo.  The Soft Reset will cause\r
512       a re-read of the pyTivo.conf file so your changes must be saved to the file before the reset.  <b>Note:</b> The only\r
513       setting that will not take effect until a hard restart is the Port setting.  Changing the Port setting requires a full\r
514       restart.      \r
515       </div>\r
517         <div id="help-add" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">\r
518       <p align="center"><strong>Add a New Section</strong> </p>\r
520       <p> Add the name of a new section.<br>\r
522       Remember if you want to add TiVo section remember it must start with _tivo_<br>\r
524       You must save your settings before the new section will be editable.<br>\r
525         </p>\r
527       </div>\r
528 #for $setting in $help_list\r
529         <div id="help-$setting" style="visibility: hidden; width: 400px; overflow: scroll; height: 450px; position: absolute; left: 0px; top: 0px;">\r
530               <p align="center"><strong>$setting</strong></p>\r
531               #for $line in $help_list[$setting]\r
532                   <strong>$(line.split(':',1)[0]):</strong>$(line.split(':',1)[1])</p>\r
533               #end for\r
534         </div>\r
535 #end for\r
536 <!-- END HELP SECTIONS --> </div>\r
538       </td>\r
540     </tr>\r
542   </tbody>\r
543 </table>\r
544 </center>\r
545 </body>\r
546 </html>\r