| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections;
- use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
- use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\FreeFieldsSection;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Info;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Switcher;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Text;
- /**
- *
- * Created by PhpStorm.
- * User: ThurData
- * Date: 12.11.19
- * Time: 13:52
- * Class EditAdditionalSection
- */
- class EditAdditionalSection extends FreeFieldsSection
- {
- protected $id = 'editAdditionalSection';
- protected $name = 'editAdditionalSection';
- use FormExtendedTrait;
- public function initContent()
- {
- $domain = $this->getWhmcsParamByKey('domain');
- $maildomain = $this->getRequestValue('actionElementId');
- if($domain == $maildomain) {
- $dkimsigenabled = new Switcher('dkimsigenabled');
- $this->addField($dkimsigenabled);
- $tfaenabled = new Switcher('tfaenabled');
- $this->addField($tfaenabled);
- $this->addField(new Hidden('domainid'));
- } else {
- $infoalias = new Info('infoaliasdomain');
- $infoalias->setId('infoaliasdomain');
- $infoalias->setName('infoaliasdomain');
- $infoalias->addHtmlAttribute('disabled', true);
- $this->addField($infoalias);
- }
- }
- }
|