Code

Added bootable option the partitions
[gosa.git] / gosa-plugins / goto / admin / systems / goto / Device / AddPartitionDialog.tpl
2 <h3>{t}Type{/t}</h3>
4 <input {if $selected_type==0} checked {/if} onClick="document.mainform.submit();"
5         type="radio" value="0" name="selected_type">{t}Disk{/t}<br>
6 <input {if $selected_type==1} checked {/if} onClick="document.mainform.submit();"
7         {if !count($disks)} disabled {/if}
8         type="radio" value="1" name="selected_type">{t}Physical partition{/t}<br>
9 <input  {if count($freeRaidPartitions) != 2} disabled {/if}
10         {if $selected_type==2} checked {/if} onClick="document.mainform.submit();"
11         type="radio" value="2" name="selected_type">{t}Raid device{/t}<br>
12 <input  {if !count($freeLvmPartitions)} disabled {/if}
13         {if $selected_type==3} checked {/if} onClick="document.mainform.submit();"
14         type="radio" value="3" name="selected_type">{t}LVM Volume group{/t}<br>
15 <input {if $selected_type==4} checked {/if} onClick="document.mainform.submit();"
16         {if !count($volumeGroupList)} disabled {/if}
17         type="radio" value="4" name="selected_type">{t}LVM Volume{/t}<br>
19 <hr>
21 {if $selected_type==4}
22     
23     <h3>{t}LVM Volume{/t}</h3>
24     <table>
25         <tr>
26             <td>{t}Volume name{/t}</td>
27             <td>
28                 <input type="text" name="v_name" value="{$v_name}">
29             </td>
30         </tr>
31         <tr>
32             <td>{t}Volume group{/t}</td>
33             <td>
34                 <select name="v_group">
35                     {html_options options=$volumeGroupList selected=$v_group}
36                 </select>
37             </td>
38         </tr>
39         <tr>
40             <td>{t}Mount point{/t}</td>
41             <td>
42                 {if $v_fsType == "swap"}
43                     <input disabled type="text" name="v_mountPoint" value=" - ">
44                 {else}
45                     <input type="text" name="v_mountPoint" value="{$v_mountPoint}">
46                 {/if}
47             </td>
48         </tr>
49         <tr>
50             <td>{t}File system type{/t}</td>
51             <td>
52                 <select name="v_fsType" onChange="document.mainform.submit();">
53                     {html_options options=$fsTypes selected=$v_fsType}
54                 </select>
55             </td>
56         </tr>
57         <tr>
58             <td>{t}Size{/t}</td>
59             <td>
60                 <input name="v_size" value="{$v_size}">
61             </td>
62         </tr>
63         <tr>
64             <td>{t}Encrypt{/t}</td>
65             <td><input type="checkbox" name="v_encrypt" {if $v_encrypt_selected} checked {/if}></td>
66         </tr>
67     </table>
69 {elseif $selected_type==3}
70     
71     <h3>{t}LVM Volume group{/t}</h3>
72     <table>
73         <tr>
74             <td>{t}Volume group name{/t}</td>
75             <td>
76                 <input type="text" name="vg_name" value="{$vg_name}">
77             </td>
78         </tr>
79         <tr>
80             <td>{t}Use LVM partitions{/t}</td>
81             <td>
82                 {foreach from=$freeLvmPartitions item=item key=key}
83                     <input type="checkbox" name="vg_partition_{$key}" 
84                         {if in_array($item, $vg_partitions)} checked {/if}>&nbsp;{$item}<br>
85                 {/foreach}
86             </td>
87         </tr>
88     </table>
90 {elseif $selected_type==2}
91     <h3>{t}Add raid device{/t}</h3>
93     <table>
94         <tr>
95             <td>{t}Mount point{/t}</td>
96             <td>
97                 {if $r_fsType == "swap" || $r_fsType == "pv"}
98                     <input disabled type="text" name="r_mountPoint" value=" - ">
99                 {else}
100                     <input type="text" name="r_mountPoint" value="{$r_mountPoint}">
101                 {/if}
102             </td>
103         </tr>
104         <tr>
105             <td>{t}File system type{/t}</td>
106             <td>
107                 <select name="r_fsType" onChange="document.mainform.submit();">
108                     {html_options options=$fsTypes selected=$r_fsType}
109                 </select>
110             </td>
111         </tr>
112         <tr>
113             <td>{t}Raid level{/t}</td>
114             <td>
115                 <select name="r_raidLevel">
116                     {html_options options=$raidLevelList selected=$r_raidLevel}
117                 </select>
118             </td>
119         </tr>
120         <tr>
121             <td>{t}Use raid partitions{/t}</td>
122             <td>
123                 {foreach from=$freeRaidPartitions item=item key=key}
124                     <input type="checkbox" name="r_partition_{$key}" 
125                         {if in_array($item, $r_partitions)} checked {/if}>&nbsp;{$item}<br>
126                 {/foreach}
127             </td>
128         </tr>
129         <tr>
130             <td>{t}Number of spares{/t}</td>
131             <td>
132                 <input type="text" value="{$r_spares}" name="r_spares">
133             </td>
134         </tr>
135         <tr>
136             <td>{t}Encrypt{/t}</td>
137             <td><input type="checkbox" name="r_encrypt" {if $r_encrypt_selected} checked {/if}></td>
138         </tr>
139     </table>
141 {elseif $selected_type==1}
143     <table width="100%">
144         <tr>
145             <td style="width:50%">
146                 <h3>{t}Add Partition{/t}</h3>
147                 <table>
148                     <tr>
149                         <td>{t}Mount point{/t}</td>
150                         <td>
151                             {if $p_fsType == "raid" || $p_fsType == "swap" || $p_fsType == "pv"}
152                                 <input disabled type="text" name="p_mountPoint" value=" - ">
153                             {else}
154                                 <input type="text" name="p_mountPoint" value="{$p_mountPoint}">
155                             {/if}
156                         </td>
157                     </tr>
158                     <tr>
159                         <td>{t}File system type{/t}</td>
160                         <td>
161                             <select name="p_fsType" onChange="document.mainform.submit();">
162                                 {html_options options=$fsTypes selected=$p_fsType}
163                             </select>
164                         </td>
165                     </tr>
166                     <tr>
167                         <td>{t}Allowable drives{/t}</td>
168                         <td>
169                             <select name="p_used_disk">
170                                 {html_options options=$disks selected=$p_used_disk}
171                             </select>
172                         </td>
173                     </tr>
174                     <tr>
175                         <td>{t}Size{/t}</td>
176                         <td>
177                             <input name="p_size" value="{$p_size}">
178                         </td>
179                     </tr>
180                     <tr>
181                         <td>{t}Force to be primary partition{/t}</td>
182                         <td><input type="checkbox" name="p_forcePrimary" {if $p_forcePrimary_selected} checked {/if}></td>
183                     </tr>
184                     <tr>
185                         <td>{t}Bootable{/t}</td>
186                         <td><input type="checkbox" name="p_bootable" {if $p_bootable_selected} checked {/if}></td>
187                     </tr>
188                     <tr>
189                         <td>{t}Encrypt{/t}</td>
190                         {if $p_fsType == "raid" || $p_fsType == "swap" || $p_fsType == "pv"}
191                             <td><input disabled type="checkbox" name="p_encrypt"></td>
192                         {else}
193                             <td><input type="checkbox" name="p_encrypt" {if $p_encrypt_selected} checked {/if}></td>
194                         {/if}
195                     </tr>
196                     <tr>
197                         <td>{t}Format{/t}</td>
198                         {if $p_fsType == "raid" || $p_fsType == "swap" || $p_fsType == "pv"}
199                             <td><input disabled type="checkbox" name="p_format"></td>
200                         {else}
201                             <td><input type="checkbox" name="p_format" {if $p_format_selected} checked {/if}></td>
202                         {/if}
203                     </tr>
204                 </table>
205             </td>
206             <td class="left-border"></td>
207             <td>
209                 <h3>{t}Additional size options{/t}</h3>
210                 <table>
211                     <tr>
212                         <td><input type="radio" name="p_size_options" value="0" 
213                                 onClick="document.mainform.submit();"
214                                 {if $p_size_options==0} checked {/if}></td>
215                         <td>{t}Fixed size{/t}</td>
216                     </tr>
217                     <tr>
218                         <td><input type="radio" name="p_size_options" value="2" 
219                                 onClick="document.mainform.submit();"
220                                 {if $p_size_options==2} checked {/if}></td>
221                         <td>{t}Fill to maximum allowable size{/t}</td>
222                     </tr>
223                     <tr>
224                         <td><input type="radio" name="p_size_options" value="1" 
225                                 onClick="document.mainform.submit();"
226                                 {if $p_size_options==1} checked {/if}></td>
227                         <td>{t}Fill all space up to{/t} 
228                             <input {if $p_size_options != 1} disabled {/if}
229                                     id="size_max_value"
230                                     type="text" value="{$p_size_max_value}">&nbsp;{t}MB{/t}
231                         </td>
232                     </tr>
233                 </table>
234             </td>
235         </tr>
236     </table>
237 {elseif $selected_type==0}
238     <h3>{t}Add disk{/t}</h3>
239     <table>
240         <tr>
241             <td>{t}Disk name{/t}</td>
242             <td>
243                 <input type="text" name="d_name" value="{$d_name}">
244             </td>
245         </tr>
246     </table>
247 {/if}
249 <hr>
250 <div class="clear"></div>
252 <div class="plugin-actions">
253   <button type='submit' name='save_partition_add'>{msgPool type=addButton}</button>
254   <button type='submit' name='cancel_partition_add'>{msgPool type=cancelButton}</button>
255 </div>