|
@@ -45,16 +45,8 @@ class UpdateForm extends BaseForm implements ClientArea
|
|
|
$this->initFields();
|
|
$this->initFields();
|
|
|
$this->loadDataToForm();
|
|
$this->loadDataToForm();
|
|
|
$diskSize = parent::getFormData()['size'];
|
|
$diskSize = parent::getFormData()['size'];
|
|
|
|
|
+ $this->$diskID = parent::getFormData()['id'];
|
|
|
$rangeField = $this->getField('additionalDiskSize');
|
|
$rangeField = $this->getField('additionalDiskSize');
|
|
|
-
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'proxmoxCloud',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $rangeField,
|
|
|
|
|
- 'Debug',
|
|
|
|
|
- parent::getFormData()
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
$rangeField->setMinValue($diskSize);
|
|
$rangeField->setMinValue($diskSize);
|
|
|
$rangeField->setDefaultValue($diskSize);
|
|
$rangeField->setDefaultValue($diskSize);
|
|
|
if ($this->configuration()->serverDiskSize->max > ($this->resourceManager->disk()->free() + $diskSize)) {
|
|
if ($this->configuration()->serverDiskSize->max > ($this->resourceManager->disk()->free() + $diskSize)) {
|
|
@@ -81,6 +73,9 @@ class UpdateForm extends BaseForm implements ClientArea
|
|
|
if ($this->configuration()->isPermissionAdditionalDiskBackup())
|
|
if ($this->configuration()->isPermissionAdditionalDiskBackup())
|
|
|
{
|
|
{
|
|
|
$field = new Switcher('backup');
|
|
$field = new Switcher('backup');
|
|
|
|
|
+ if ($this->diskID == 'scsi0') {
|
|
|
|
|
+ $field->addHtmlAttribute(':disabled', true);
|
|
|
|
|
+ }
|
|
|
$this->addField($field);
|
|
$this->addField($field);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|