GeneralSection.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Client\Setting\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. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
  10. /**
  11. *
  12. * Created by PhpStorm.
  13. * User: ThurData
  14. * Date: 12.11.19
  15. * Time: 13:39
  16. * Class GeneralSection
  17. */
  18. class GeneralSection extends FreeFieldsSection
  19. {
  20. protected $id = 'generalSection';
  21. protected $name = 'generalSection';
  22. use FormExtendedTrait;
  23. public function initContent()
  24. {
  25. $row = new InputGroup('MX');
  26. $row->addInputComponent((new InputGroupElements\Text('mxthurdata'))->addHtmlAttribute('readonly','true'));
  27. $row->addInputAddon('', false, '&hArr;');
  28. $row->addInputComponent((new InputGroupElements\Text('mxactive'))->addHtmlAttribute('readonly','true'));
  29. $this->addSection($row);
  30. $row = new InputGroup('SPF');
  31. $row->addInputComponent((new InputGroupElements\Text('spfthurdata'))->addHtmlAttribute('readonly','true'));
  32. $row->addInputAddon('', false, '&hArr;');
  33. $row->addInputComponent((new InputGroupElements\Text('spf'))->addHtmlAttribute('readonly','true'));
  34. $this->addSection($row);
  35. $row = new InputGroup('DMARC');
  36. $row->addInputComponent((new InputGroupElements\Text('dmarcthurdata'))->addHtmlAttribute('readonly','true'));
  37. $row->addInputAddon('', false, '&hArr;');
  38. $row->addInputComponent((new InputGroupElements\Text('dmarc'))->addHtmlAttribute('readonly','true'));
  39. $this->addSection($row);
  40. $row = new InputGroup('DKIM');
  41. $row->addInputComponent((new InputGroupElements\Text('dkimthurdata'))->addHtmlAttribute('readonly','true'));
  42. $row->addInputAddon('', false, '&hArr;');
  43. $row->addInputComponent((new InputGroupElements\Text('dkim'))->addHtmlAttribute('readonly','true'));
  44. $this->addSection($row);
  45. $this->generateDoubleSection([new Hidden('infomaildomain'), new Hidden('id')]);
  46. $this->generateDoubleSection([new Hidden('selfdns'), new Hidden('dnsok')]);
  47. }
  48. }