ClientNotificationSection.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace ModulesGarden\Servers\ProxmoxVps\App\UI\Admin\Product\Sections;
  3. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\AdminArea;
  4. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Select;
  5. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
  6. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
  7. class ClientNotificationSection extends BoxSection implements AdminArea
  8. {
  9. protected $id = 'clientNotificationSection';
  10. protected $name = 'clientNotificationSection';
  11. protected $title = 'clientNotificationSection';
  12. /**
  13. * @var HalfPageSection
  14. */
  15. private $leftSection;
  16. /**
  17. * @var HalfPageSection
  18. */
  19. private $rightSection;
  20. public function initContent()
  21. {
  22. $this->leftSection = new HalfPageSection('leftSection');
  23. $this->rightSection = new HalfPageSection('rightSection');
  24. $this->addSection($this->leftSection)
  25. ->addSection($this->rightSection);
  26. $this->initFields();
  27. }
  28. private function initFields()
  29. {
  30. //Welcome Email
  31. $field = new Select('customconfigoption[welcomeEmailTemplateId]');
  32. $field->setDescription('tip');
  33. $this->leftSection->addField($field);
  34. //Reinstall
  35. $field = new Select('customconfigoption[reinstallEmailTemplateId]');
  36. $field->setDescription('tip');
  37. $this->rightSection->addField($field);
  38. }
  39. }