GeneralSection.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections;
  3. use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
  4. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\FreeFieldsSection;
  5. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Select;
  6. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Text;
  7. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\InputGroup;
  8. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\InputGroupElements;
  9. /**
  10. *
  11. * Created by PhpStorm.
  12. * User: ThurData
  13. * Date: 12.11.19
  14. * Time: 13:39
  15. * Class GeneralSection
  16. */
  17. class GeneralSection extends FreeFieldsSection
  18. {
  19. protected $id = 'generalSection';
  20. protected $name = 'generalSection';
  21. use FormExtendedTrait;
  22. public function initContent()
  23. {
  24. $email = new InputGroup('usernameGroup');
  25. $email->addTextField('name', false, true);
  26. $email->addInputAddon('emailSign', false, '@');
  27. $email->addInputComponent((new InputGroupElements\Text('domain'))->addHtmlAttribute('readonly','true'));
  28. $this->addSection($email);
  29. $this->generateDoubleSection([new Text('description'), new Select('type')]);
  30. $this->generateDoubleSection([new Select('manager'), new Select('status')]);
  31. }
  32. }