EditSettingForm.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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\App\UI\Client\Setting\Buttons\InfoButton;
  5. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Providers\EditSettingDataProvider;
  6. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
  7. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
  8. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Text;
  9. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Switcher;
  10. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\BaseForm;
  11. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\FormConstants;
  12. use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ButtonCustomAction;
  13. use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ButtonModal;
  14. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
  15. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections\EditGeneralSection;
  16. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections\EditAdditionalSection;
  17. use ThurData\Servers\KerioEmail\Core\Helper\DnsHelper;
  18. use function ThurData\Servers\KerioEmail\Core\Helper\di;
  19. /**
  20. *
  21. * Created by PhpStorm.
  22. * User: ThurData
  23. * Date: 18.09.19
  24. * Time: 09:29
  25. * Class EditSettingForm
  26. */
  27. class EditSettingForm extends SortedFieldForm implements ClientArea
  28. {
  29. use FormExtendedTrait;
  30. protected $id = 'editSettingForm';
  31. protected $name = 'editSettingForm';
  32. protected $title = 'editSettingForm';
  33. public function initContent()
  34. {
  35. $this->initIds('editSettingForm');
  36. $this->setFormType(FormConstants::UPDATE);
  37. $this->setProvider(new EditSettingDataProvider());
  38. $this->initFields();
  39. $this->loadDataToForm();
  40. }
  41. public function initFields()
  42. {
  43. $maildomain = $this->getWhmcsParamByKey('domain');
  44. logModuleCall(
  45. 'kerioEmail',
  46. __FUNCTION__,
  47. $this,
  48. 'Debug',
  49. $maildomain
  50. );
  51. $this->addSection(new EditGeneralSection());
  52. $this->addSection(new EditAdditionalSection());
  53. }
  54. }