|
|
@@ -45,7 +45,6 @@ class UpdateForm extends BaseForm implements ClientArea
|
|
|
$this->initFields();
|
|
|
$this->loadDataToForm();
|
|
|
$diskSize = parent::getFormData()['size'];
|
|
|
- $this->$diskID = parent::getFormData()['id'];
|
|
|
$rangeField = $this->getField('additionalDiskSize');
|
|
|
$rangeField->setMinValue($diskSize);
|
|
|
$rangeField->setDefaultValue($diskSize);
|
|
|
@@ -54,6 +53,11 @@ class UpdateForm extends BaseForm implements ClientArea
|
|
|
} else {
|
|
|
$rangeField->setMaxValue($this->configuration()->serverDiskSize->max);
|
|
|
}
|
|
|
+ $backupSwitcher = $this->getField('backup');
|
|
|
+ if ( parent::getFormData()['id'] == 'scsi0') {
|
|
|
+ $backupSwitcher->htmlAttributes['style'] = "display: none;";
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public function getAllowedActions()
|
|
|
@@ -73,18 +77,6 @@ class UpdateForm extends BaseForm implements ClientArea
|
|
|
if ($this->configuration()->isPermissionAdditionalDiskBackup())
|
|
|
{
|
|
|
$field = new Switcher('backup');
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'proxmoxCloud',
|
|
|
- __FUNCTION__,
|
|
|
- $this,
|
|
|
- 'Debug',
|
|
|
- $this->diskID
|
|
|
- );
|
|
|
-
|
|
|
- if ($this->diskID == 'scsi0') {
|
|
|
- $field->htmlAttributes['style'] = "display: none;";
|
|
|
- }
|
|
|
$this->addField($field);
|
|
|
}
|
|
|
}
|