GeneralSection.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. $mxthurdata = new Text('mxthurdata');
  26. $mxthurdata->addHtmlAttribute('readonly','true');
  27. $mxthurdata->setDescription('description');
  28. $mxactive = new Text('mxactive');
  29. $mxactive->addHtmlAttribute('readonly','true');
  30. $mxactive->setDescription('description');
  31. $this->generateDoubleSection([$mxthurdata, $mxactive]);
  32. $row = new InputGroup('SPF');
  33. $row->addInputComponent((new InputGroupElements\Text('spfthurdata'))->addHtmlAttribute('readonly','true'));
  34. $row->addInputAddon('', false, '&hArr;');
  35. $row->addInputComponent((new InputGroupElements\Text('spf'))->addHtmlAttribute('readonly','true'));
  36. $this->addSection($row);
  37. $row = new InputGroup('DMARC');
  38. $row->addInputComponent((new InputGroupElements\Text('dmarcthurdata'))->addHtmlAttribute('readonly','true'));
  39. $row->addInputAddon('', false, '&hArr;');
  40. $row->addInputComponent((new InputGroupElements\Text('dmarc'))->addHtmlAttribute('readonly','true'));
  41. $this->addSection($row);
  42. $row = new InputGroup('DKIM');
  43. $row->addInputComponent((new InputGroupElements\Text('dkimthurdata'))->addHtmlAttribute('readonly','true'));
  44. $row->addInputAddon('', false, '&hArr;');
  45. $row->addInputComponent((new InputGroupElements\Text('dkim'))->addHtmlAttribute('readonly','true'));
  46. $this->addSection($row);
  47. $this->generateDoubleSection([new Hidden('infomaildomain'), new Hidden('id')]);
  48. $this->generateDoubleSection([new Hidden('selfdns'), new Hidden('dnsok')]);
  49. }
  50. }