Verified Commit 4035c3a4 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

ambulance: fix(fai) Fix LVM creation dialog

issue #5821
Showing with 11 additions and 8 deletions
+11 -8
...@@ -289,8 +289,18 @@ class faiDiskEntry extends simplePlugin ...@@ -289,8 +289,18 @@ class faiDiskEntry extends simplePlugin
{ {
parent::__construct($dn, NULL, $parent); parent::__construct($dn, NULL, $parent);
if ($disk) {
$this->is_edit = TRUE;
$this->cn = $disk['cn'];
$this->description = $disk['description'];
$this->attributesAccess['cn']->setInitialValue($this->cn);
}
$this->FAIdiskType = $type; $this->FAIdiskType = $type;
if ($this->FAIdiskType != 'lvm') { if ($this->FAIdiskType == 'lvm') {
$this->attributesAccess['lvmDevices']->attribute->setChoices($this->getAvailablePartitions());
} else {
$this->attributesAccess['lvmDevices']->setDisabled(TRUE); $this->attributesAccess['lvmDevices']->setDisabled(TRUE);
$this->attributesAccess['lvmDevices']->setVisible(FALSE); $this->attributesAccess['lvmDevices']->setVisible(FALSE);
} }
...@@ -309,14 +319,7 @@ class faiDiskEntry extends simplePlugin ...@@ -309,14 +319,7 @@ class faiDiskEntry extends simplePlugin
} }
if ($disk) { if ($disk) {
$this->is_edit = TRUE;
$this->cn = $disk['cn'];
$this->description = $disk['description'];
$this->attributesAccess['cn']->setInitialValue($this->cn);
/* Get devices used in volume base disks */ /* Get devices used in volume base disks */
$this->attributesAccess['lvmDevices']->attribute->setChoices($this->getAvailablePartitions());
if (isset($disk['FAIlvmDevice'])) { if (isset($disk['FAIlvmDevice'])) {
$this->lvmDevices = $disk['FAIlvmDevice']; $this->lvmDevices = $disk['FAIlvmDevice'];
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment