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