]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/ach_add.tpl
ebl Add FileSet view action
[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    <form name='form1' action="?" method='get'>
7     <table>
8      <tr><td>Name :</td>     
9          <td>
10           <select name='ach' class='formulaire' id='ach'>
11 <TMPL_LOOP devices><option value='<TMPL_VAR name>'><TMPL_VAR name></option></TMPL_LOOP>
12           </select>
13          </td>
14      </tr>
15      <tr><td>Pre-command :</td> 
16          <td> <input class="formulaire" type='text' id='precmd' value='sudo'
17            title='can be "sudo" or "ssh storage@storagehost"...' name='precmd'>
18          </td>
19      </tr>
20      <tr><td>mtx command :</td> 
21          <td> <input class="formulaire" type='text' name='mtxcmd' size='32'
22                value='/usr/sbin/mtx' id='mtxcmd'>
23          </td>
24      </tr>
25      <tr><td>Device :</td> 
26          <td> <input class="formulaire" type='text' name='device' 
27                value='/dev/changer' id='device'>
28          </td>
29      </tr>
30     <tr><td><b>Drives</b></td><td/></tr>
31     <TMPL_LOOP devices>
32     <tr>
33      <td><input class='formulaire' type='checkbox' id='drive_<TMPL_VAR name>'
34                 name='drives' value='<TMPL_VAR name>'><TMPL_VAR name>
35      </td>
36      <td>index <input type='text' title='drive index' class='formulaire'
37                 id='index_<TMPL_VAR name>' value='' 
38                 name='index_<TMPL_VAR name>' size='3'>
39      </td>
40     </tr>
41     </TMPL_LOOP>
42     </table>
43     <input type="image" name='action' value='ach_add' src='/bweb/save.png'>
44    </form>
45 </div>
46
47 <script type="text/javascript" language="JavaScript">
48   <TMPL_IF name>
49   for (var i=0; i < document.form1.ach.length; ++i) {
50      if (document.form1.ach[i].value == '<TMPL_VAR name>') {
51         document.form1.ach[i].selected = true;
52      }
53   }
54   </TMPL_IF>
55   <TMPL_IF mtxcmd>
56      document.getElementById('mtxcmd').value='<TMPL_VAR mtxcmd>';
57   </TMPL_IF>
58   <TMPL_IF precmd>
59      document.getElementById('precmd').value='<TMPL_VAR precmd>';
60   </TMPL_IF>
61   <TMPL_IF device>
62      document.getElementById('device').value='<TMPL_VAR device>';
63   </TMPL_IF>
64   <TMPL_IF drives>
65    <TMPL_LOOP drives>
66      document.getElementById('drive_<TMPL_VAR name>').checked=true;
67      document.getElementById('index_<TMPL_VAR name>').value=<TMPL_VAR index>;
68    </TMPL_LOOP>
69   </TMPL_IF>
70 </script>