| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace ModulesGarden\ProxmoxAddon\App\UI\Settings\Sections;
- use ModulesGarden\ProxmoxAddon\App\UI\Validators\IpAddressAndHostnameValidator;
- use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Text;
- use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Sections\BoxSection;
- use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Sections\HalfPageSection;
- class ConsoleSection extends BoxSection
- {
- protected $id = 'consoleSection';
- protected $name = 'consoleSection';
- protected $title = 'consoleSection';
- public function initContent(){
- //Add Sections
- $leftSection = new HalfPageSection('leftSection');
- $rightSection = new HalfPageSection('rightSection');
- $this->addSection($leftSection);
- $this->addSection($rightSection);
- //consoleHost
- $field = new Text('consoleHost');
- $field->addValidator(new IpAddressAndHostnameValidator());
- $leftSection->addField($field);
- //consoleApiKey
- $field = new Text('consoleApiKey');
- $rightSection->addField($field);
- }
- }
|