| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Admin\Product\Sections\Lxc;
- use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
- use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Select;
- use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Switcher;
- use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Sections\BoxSection;
- use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
- class MountPointSection extends BoxSection implements AdminArea
- {
- protected $id = 'mountPointSection';
- protected $name = 'mountPointSection';
- protected $title = 'mountPointSection';
- /**
- * @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()
- {
- //Storage
- $field = new Select('customconfigoption[mountPointStorage]');
- $field->setDefaultValue('local-lvm');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //ACLs
- $field = new Select('customconfigoption[mountPointAcl]');
- $field->setDefaultValue("default");
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Read-Only
- $field = new Switcher('customconfigoption[mountPointRo]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //Enable Quota
- $field = new Switcher('customconfigoption[mountPointQuota]');
- $field->setDescription('tip');
- $this->rightSection->addField($field);
- //Skip Replication
- $field = new Switcher('customconfigoption[mountPointReplicate]');
- $field->setDescription('tip');
- $this->leftSection->addField($field);
- //permissionMountPointBackup
- $field = new Switcher('customconfigoption[permissionMountPointBackup]');
- $field->setDescription('tip');
- $field->setDefaultValue("on");
- $this->rightSection->addField($field);
- }
- }
|