GeneralSection.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. di('lang')->absoluteT('dnsinfomessage') ? $message = di('lang')->absoluteT('dnsinfomessage') :
  26. $message = 'DNS Informations for <b id="infoalertmaildomain" class="lu-alert--lg"></b>
  27. <div id="addalertheader" class="lu-alert--lg"></div>
  28. <div id="addmxmessage"></div>
  29. <div id="addspfmessage"></div>
  30. <div id="adddmarcmessage"></div>
  31. <div id="adddkimmessage"></div><br><br>
  32. <div id="addalertfooter"></div>
  33. <div class="lu-form-group">
  34. <label class="lu-form-label">DNS Record Type</label>
  35. <div class="lu-input-group" style="background:#eeeeee">
  36. <input type="text" value="ThurData Recommended" readonly="readonly" class="lu-form-control" style="">
  37. <div class="lu-input-group__addon">&hArr;</div>
  38. <input type="text" value="Current Value" readonly="readonly" class="lu-form-control" style="">
  39. </div>
  40. </div>';
  41. $this->addInternalAlert($message, null, 100);
  42. $row = new InputGroup('MX');
  43. $row->addInputComponent((new InputGroupElements\Text('mxthurdata'))->addHtmlAttribute('readonly','true'));
  44. $row->addInputAddon('', false, '&hArr;');
  45. $row->addInputComponent((new InputGroupElements\Text('mxactive'))->addHtmlAttribute('readonly','true'));
  46. $this->addSection($row);
  47. $row = new InputGroup('SPF');
  48. $row->addInputComponent((new InputGroupElements\Text('spfthurdata'))->addHtmlAttribute('readonly','true'));
  49. $row->addInputAddon('', false, '&hArr;');
  50. $row->addInputComponent((new InputGroupElements\Text('spf'))->addHtmlAttribute('readonly','true'));
  51. $this->addSection($row);
  52. $row = new InputGroup('DMARC');
  53. $row->addInputComponent((new InputGroupElements\Text('dmarcthurdata'))->addHtmlAttribute('readonly','true'));
  54. $row->addInputAddon('', false, '&hArr;');
  55. $row->addInputComponent((new InputGroupElements\Text('dmarc'))->addHtmlAttribute('readonly','true'));
  56. $this->addSection($row);
  57. $row = new InputGroup('DKIM');
  58. $row->addInputComponent((new InputGroupElements\Text('dkimthurdata'))->addHtmlAttribute('readonly','true'));
  59. $row->addInputAddon('', false, '&hArr;');
  60. $row->addInputComponent((new InputGroupElements\Text('dkim'))->addHtmlAttribute('readonly','true'));
  61. $this->addSection($row);
  62. $this->generateDoubleSection([new Hidden('infomaildomain'), new Hidden('id')]);
  63. $this->generateDoubleSection([new Hidden('selfdns'), new Hidden('dnsok')]);
  64. }
  65. }