| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxVps\App\UI\Admin\Product\Sections\Lxc;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\AdminArea;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Select;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
- use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
- class ConfigurableOptionUnitsSection extends BoxSection implements AdminArea
- {
- protected $id = 'configurableOptionUnitsSection';
- protected $name = 'configurableOptionUnitsSection';
- protected $title = 'configurableOptionUnitsSection';
- /**
- * @var HalfPageSection
- */
- private $leftSection;
- /**
- * @var HalfPageSection
- */
- private $rightSection;
- public function initContent()
- {
- $this->leftSection = new HalfPageSection('leftSection');
- $this->rightSection = new HalfPageSection('rightSection');
- $this->addSection($this->leftSection)
- ->addSection($this->rightSection);
- $this->initFields();
- }
- private function initFields()
- {
- //SWAP For the VM - MB/GB
- $field = new Select('customconfigoption[swapUnit]');
- $field->setDefaultValue("mb");
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Memory- MB/GB
- $field = new Select('customconfigoption[memoryUnit]');
- $field->setDefaultValue("mb");
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Disk Size - MB/GB/TB
- $field = new Select('customconfigoption[diskUnit]');
- $field->setDefaultValue("gb");
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Additional Disks Size - MB/GB/TB
- $field = new Select('customconfigoption[additionalDiskUnit]');
- $field->setDescription('tip');
- $field->setDefaultValue("gb");
- $this->rightSection->addField($field);
- }
- }
|