MainSection.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Admin\Product\Sections;
  3. use ModulesGarden\Servers\ProxmoxCloudVps\Core\Lang\Lang;
  4. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
  5. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Select;
  6. use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Switcher;
  7. use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\sl;
  8. class MainSection extends TwiceColumnSection implements AdminArea
  9. {
  10. protected $id = 'mainSection';
  11. protected $name = 'mainSection';
  12. protected $title = 'mainSection';
  13. protected function initFields()
  14. {
  15. /**
  16. * @var Lang $lang
  17. */
  18. $lang = sl("lang");
  19. //Virtualization
  20. $field = new Select('customconfigoption[virtualization]');
  21. $field->setDefaultValue('qemu');
  22. $field->setDescription('tip');
  23. $this->addField($field);
  24. //Default Node
  25. $field = new Select('customconfigoption[defaultNode]');
  26. $field->setDescription('tip');
  27. $this->addField($field);
  28. //Check Available Resources
  29. $field = new Switcher('customconfigoption[checkResources]');
  30. $field->setDescription('tip');
  31. $this->addField($field);
  32. //resetUsageFirstDayOfMonth
  33. $field = new Switcher('customconfigoption[resetUsageFirstDayOfMonth]');
  34. $field->setDescription('tip');
  35. $this->addField($field);
  36. }
  37. }