]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/tpl/move_media.tpl
ebl Add Enabled option to update_media, extern/intern
[bacula/bacula] / gui / bweb / tpl / move_media.tpl
1 <br/>
2  <div class='titlediv'>
3   <h1 class='newstitle'>Move media</h1>
4  </div>
5  <div class="bodydiv">
6    <form name='form1' action='?' method='get'>
7     <table id='id<TMPL_VAR NAME=ID>'></table>
8     <table border='0'>
9     <tr><td> New location: </td><td>
10 <select name='newlocation' class='formulaire'>
11     <TMPL_LOOP NAME=db_locations>
12     <option value='<TMPL_VAR NAME=location>'><TMPL_VAR NAME=location></option>
13     </TMPL_LOOP>
14 </select>
15     </td></tr><tr><td> Enabled: </td><td>
16 <select name='enabled' class='formulaire'>
17     <option value='no'>no</option>
18     <option value='yes'>yes</option>
19     <option value='archived'>archived</option>
20 </select>
21     </td><tr><td> User: </td><td>
22 <input type='text' name='user' value='<TMPL_VAR loginname>' class='formulaire'>
23     </td></tr>
24     </td></tr><tr><td> Comment: </td><td>
25 <textarea name="comment" class='formulaire'></textarea>
26     </td></tr>
27     </table>
28     <label>
29     <input type="image" type='submit' name='action' value='change_location' src='/bweb/apply.png'> Move
30     </label>
31    </form>
32  </div>
33
34 <script type="text/javascript" language="JavaScript">
35
36 var header = new Array("Volume Name", "Location", "Select");
37
38 var data = new Array();
39 var chkbox;
40
41 <TMPL_LOOP NAME=media>
42 chkbox = document.createElement('INPUT');
43 chkbox.type  = 'checkbox';
44 chkbox.value = '<TMPL_VAR name=volumename>';
45 chkbox.name  = 'media';
46 chkbox.checked = 1;
47
48 data.push( new Array(
49 "<TMPL_VAR NAME=volumename>",
50 "<TMPL_VAR NAME=location>",
51 chkbox
52  )
53 );
54 </TMPL_LOOP>
55
56 nrsTable.setup(
57 {
58  table_name:     "id<TMPL_VAR NAME=ID>",
59  table_header: header,
60  table_data: data,
61  up_icon: up_icon,
62  down_icon: down_icon,
63  prev_icon: prev_icon,
64  next_icon: next_icon,
65  rew_icon:  rew_icon,
66  fwd_icon:  fwd_icon,
67 // natural_compare: false,
68  even_cell_color: even_cell_color,
69  odd_cell_color: odd_cell_color, 
70  header_color: header_color,
71  page_nav: true,
72  padding: 3,
73 // disable_sorting: new Array(5,6),
74  rows_per_page: rows_per_page
75 }
76 );
77 <TMPL_IF enabled>
78 ok=1;
79 for (var i=0; ok && i < document.form1.enabled.length; ++i) {
80    if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
81       document.form1.enabled[i].selected = true;
82       ok=0;
83    }
84 }
85 </TMPL_IF>
86 </script>