InfoForm.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Client\Setting\Forms;
  3. use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
  4. use ThurData\Servers\KerioEmail\Core\UI\Traits\FormDataProvider;
  5. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Providers\InfoSettingDataProvider;
  6. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
  7. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
  8. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections\AdditionalSection;
  9. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections\GeneralSection;
  10. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\FormConstants;
  11. use function ThurData\Servers\KerioEmail\Core\Helper\di;
  12. class InfoForm extends SortedFieldForm implements ClientArea
  13. {
  14. use FormExtendedTrait;
  15. use FormDataProvider;
  16. public function initContent()
  17. {
  18. $this->initIds('infoForm');
  19. $this->setFormType(FormConstants::READ);
  20. $this->setProvider(new InfoSettingDataProvider());
  21. $this->initFields();
  22. $this->loadDataToForm();
  23. }
  24. public function getAllowedActions()
  25. {
  26. return ['info'];
  27. }
  28. private function initFields()
  29. {
  30. di('lang')->absoluteT('dnsinfomessage') ? $message = di('lang')->absoluteT('dnsinfomessage') :
  31. $message = 'DNS Informations for <b id="infoalertmaildomain" class="lu-alert--lg"></b>
  32. <div id="addalertheader" class="lu-alert--lg"></div>
  33. <div id="addmxmessage"></div>
  34. <div id="addspfmessage"></div>
  35. <div id="adddmarcmessage"></div>
  36. <div id="adddkimmessage"></div><br><br>
  37. <div id="addalertfooter"></div>
  38. <div class="lu-form-group">
  39. <label class="lu-form-label">DNS Record Type</label>
  40. <div class="lu-input-group" style="background:#eeeeee">
  41. <input type="text" value="ThurData Recommended" readonly="readonly" class="lu-form-control" style="">
  42. <div class="lu-input-group__addon">&hArr;</div>
  43. <input type="text" value="Current Value" readonly="readonly" class="lu-form-control" style="">
  44. </div>
  45. </div>';
  46. $this->addInternalAlert($message, null, 100);
  47. $this->addSection(new GeneralSection());
  48. $this->addSection(new AdditionalSection());
  49. }
  50. }