InfoModal.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Client\Setting\Modals;
  3. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Forms\InfoForm;
  4. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
  5. use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ModalActionButtons\BaseCancelButton;
  6. use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ModalActionButtons\BaseRedirectButton;
  7. use ThurData\Servers\KerioEmail\Core\UI\Widget\Modals\BaseEditModal;
  8. class InfoModal extends BaseEditModal implements ClientArea
  9. {
  10. protected $id = 'infoModal';
  11. protected $name = 'infoModal';
  12. protected $title = 'infoModal';
  13. public function initContent()
  14. {
  15. $this->initIds('infoModal');
  16. $this->addForm(new InfoForm());
  17. }
  18. protected function initActionButtons()
  19. {
  20. if (!empty($this->actionButtons))
  21. {
  22. return $this;
  23. }
  24. $this->addActionButton(new BaseCancelButton());
  25. $transferButton = new BaseRedirectButton('transferDomain');
  26. $transferButton->setRawUrl('card.php?');
  27. $transferButton->addRedirectParam('a','add');
  28. $transferButton->addRedirectParam('domain','transfer');
  29. $transferButton->addRedirectParam('sld','MAILDOMAIN');
  30. $this->addActionButton($transferButton);
  31. return $this;
  32. }
  33. }