GeneralSection.php 2.4 KB

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