summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a07020)
raw | patch | inline | side by side (parent: 3a07020)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 May 2011 09:36:12 +0000 (09:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 May 2011 09:36:12 +0000 (09:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20814 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/AddPartitionDialog.tpl b/gosa-plugins/goto/admin/systems/goto/Device/AddPartitionDialog.tpl
index 03597c8c6471abb2e85523fba2b0ef3cb6242089..8e077657e210d4ab0b45d9e1fc972338cf43241b 100644 (file)
</tr>
<tr>
<td>{t}Encrypt{/t}</td>
- <td><input type="checkbox" name="p_encrypt" {if $p_encrypt_selected} checked {/if}></td>
+ {if $p_fsType == "raid" || $p_fsType == "swap" || $p_fsType == "pv"}
+ <td><input disabled type="checkbox" name="p_encrypt"></td>
+ {else}
+ <td><input type="checkbox" name="p_encrypt" {if $p_encrypt_selected} checked {/if}></td>
+ {/if}
+ </tr>
+ <tr>
+ <td>{t}Format{/t}</td>
+ {if $p_fsType == "raid" || $p_fsType == "swap" || $p_fsType == "pv"}
+ <td><input disabled type="checkbox" name="p_format"></td>
+ {else}
+ <td><input type="checkbox" name="p_format" {if $p_format_selected} checked {/if}></td>
+ {/if}
</tr>
</table>
</td>
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_AddPartitionDialog.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_AddPartitionDialog.inc
index ce55f3564aed1b8647f599bd4f0ca6249ff0d80a..cef1e124cade1f374ec6add4c88a9d83e8ab7a63 100644 (file)
// Partition properties
public $p_size = 1000;
+ public $p_format = FALSE;
public $p_fsType = 'ext3';
public $p_mountPoint = '';
public $p_used_disk = array();
// Partitions attributes
public $p_attributes = array("p_size", "p_fsType", "p_mountPoint", "p_forcePrimary", "p_encrypt",
- "p_size_options", "p_size_max_value", "p_used_disk");
+ "p_size_options", "p_size_max_value", "p_used_disk", "p_format");
// Raid device attributes
public $r_attributes = array("r_fsType", "r_mountPoint", "r_raidLevel", "r_partitions",
switch($this->selected_type){
case PARTITION: {
$attrs = $this->p_attributes;
- $bool_attrs = array("p_forcePrimary", "p_encrypt");
+ $bool_attrs = array("p_forcePrimary", "p_encrypt", "p_format");
break;
}
case RAID_DEVICE: {
switch($this->selected_type){
case PARTITION: {
$attrs = $this->p_attributes;
- $bool_attrs = array("p_forcePrimary", "p_encrypt");
+ $bool_attrs = array("p_forcePrimary", "p_encrypt", "p_format");
break;
}
case RAID_DEVICE: {
$maxSize = $this->p_size_max_value;
}
$grow = $this->p_size_options == 1;
- $format = FALSE;
+ $format = $this->p_format == 1;
$boot = FALSE;
$primary = $this->p_forcePrimary;
$fsType = $this->p_fsType;
}
$target = $target.str_pad($id, 2, '0', STR_PAD_LEFT);
$fsType = $fsOptions = NULL;
+ $encrypt = $format = FALSE;
}else
// We've to create a raid disk
}
$target = $target.str_pad($id, 2, '0', STR_PAD_LEFT);
$fsType = $fsOptions = NULL;
+ $encrypt = $format = FALSE;
}else{
// Add normal-physical partition
$target = $this->p_mountPoint;
if($fsType == "swap"){
$target = "swap";
+ $encrypt = $format = FALSE;
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_DevicePartition.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_DevicePartition.inc
index 4f18a8bbfbcd4f7cea364c311edf616910a9bd4e..d955479b5719feee0839af0c8d94ca3ce9b78938 100644 (file)
$this->entryList->setEditable(false);
$this->entryList->setWidth("100%");
$this->entryList->setHeight("400px");
- $this->entryList->setHeader(array(_("Type"),_("Target"),_("Size"),_("Uses device")." / "._("Used by"),_("Filesystem"), _("Options")));
+ $this->entryList->setHeader(array(_("Type"),_("Target"),_("Size"),_("Uses device")." / "._("Used by"),
+ _("Filesystem"), _("Options"), _("Format"), "-"));
$this->entryList->setColspecs(array('*','*','*', '*'));
$this->entryList->setAcl('rwcdm');
$this->entryList->setReorderable(FALSE);
$fsType = trim($fsType);
}
+ $formatImg = ($part['format']) ? image('images/true.png') : "";
+
// Add entry to the listing
$lData[] = array("data" => array(
$str,
$this->__convertPartSize($part['size']),
$device,
$fsType,
- $part['fsOptions']));
+ $part['fsOptions'],
+ $formatImg));
}
}
}
}
// Updated columns length for all entries to avoid render errors.
- $length = 6;
+ $length = 8;
foreach($lData as $id => $entry){
while(count($lData[$id]['data']) < $length){
$lData[$id]['data'][] = '';