]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/ach_add.tpl
Renamed cleanup goto target into bail_out which is the prefered name from the develop...
[bacula/bacula] / gui / bweb / tpl / ach_add.tpl
1 <br/>
2 <div class='titlediv'>
3   <h1 class='newstitle'><TMPL_UNLESS name>__New__</TMPL_UNLESS> __Autochanger__ </h1>
4 </div>
5 <div class='bodydiv'>
6    __You have to create a Location which will have the same name.__<br/><br/>
7
8    <form name='form1' action="?" method='get'>
9     <table>
10      <tr><td>__Name:__</td>     
11          <td>
12           <select name='ach' class='formulaire' id='ach'>
13 <TMPL_LOOP devices><option value='<TMPL_VAR name>'><TMPL_VAR name></option></TMPL_LOOP>
14           </select>
15          </td>
16      </tr>
17      <tr><td>__Pre-command:__</td> 
18          <td> <input class="formulaire" type='text' id='precmd' value='sudo'
19            title='__can be "sudo" or "ssh storage@storagehost"...__' name='precmd'>
20          </td>
21      </tr>
22      <tr><td>__mtx command:__</td> 
23          <td> <input class="formulaire" type='text' name='mtxcmd' size='32'
24                value='/usr/sbin/mtx' id='mtxcmd'>
25          </td>
26      </tr>
27      <tr><td>__Device:__</td> 
28          <td> <input class="formulaire" type='text' name='device' 
29                value='/dev/changer' id='device'>
30          </td>
31      </tr>
32     <tr><td><b>__Drives__</b></td><td/></tr>
33     <TMPL_LOOP devices>
34     <tr>
35      <td><input class='formulaire' type='checkbox' id='drive_<TMPL_VAR name>'
36                 name='drives' value='<TMPL_VAR name>'><TMPL_VAR name>
37      </td>
38      <td>__index__ <input type='text' title='__drive index__' 
39                 class='formulaire'
40                 id='index_<TMPL_VAR name>' value='' 
41                 name='index_<TMPL_VAR name>' size='3'>
42      </td>
43     </tr>
44     </TMPL_LOOP>
45     </table>
46     <button type="submit" class="bp" name='action' value='ach_add'> <img src='/bweb/save.png' alt=''>__Save__</button>
47    </form>
48 </div>
49
50 <script type="text/javascript" language="JavaScript">
51   <TMPL_IF name>
52   for (var i=0; i < document.form1.ach.length; ++i) {
53      if (document.form1.ach[i].value == '<TMPL_VAR name>') {
54         document.form1.ach[i].selected = true;
55      }
56   }
57   </TMPL_IF>
58   <TMPL_IF mtxcmd>
59      document.getElementById('mtxcmd').value='<TMPL_VAR mtxcmd>';
60   </TMPL_IF>
61   <TMPL_IF precmd>
62      document.getElementById('precmd').value='<TMPL_VAR precmd>';
63   </TMPL_IF>
64   <TMPL_IF device>
65      document.getElementById('device').value='<TMPL_VAR device>';
66   </TMPL_IF>
67   <TMPL_IF drives>
68    <TMPL_LOOP drives>
69      document.getElementById('drive_<TMPL_VAR name>').checked=true;
70      document.getElementById('index_<TMPL_VAR name>').value=<TMPL_VAR index>;
71    </TMPL_LOOP>
72   </TMPL_IF>
73 </script>