| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?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\Select;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Text;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\InputGroup;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\InputGroupElements;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
- use function ThurData\Servers\KerioEmail\Core\Helper\di;
- /**
- *
- * Created by PhpStorm.
- * User: ThurData
- * Date: 12.11.19
- * Time: 13:39
- * Class GeneralSection
- */
- class GeneralSection extends FreeFieldsSection
- {
- protected $id = 'generalSection';
- protected $name = 'generalSection';
- use FormExtendedTrait;
- public function initContent()
- {
- $this->generateDoubleSection([new Text('firstname'), new Text('lastname')]);
- $email = new InputGroup('usernameGroup');
- $email->addTextField('username', false, true);
- $email->addInputAddon('emailSign', false, '@');
- $email->addInputComponent((new InputGroupElements\Text('domain'))->addHtmlAttribute('readonly','true'));
- $this->addSection($email);
- $this->generateDoubleSection([new Text('display_name'), new Select('status')]);
- $quota = new Text('quota');
- $quota->setDescription('description');
- $quota->addValidator(new Decimal(0));
- $this->generateDoubleSection([$quota, new Select('unit')]);
- $passwd = new Password('password');
- $passwd->setDescription('description');
- $passwd->addValidator(new PasswordsValidator());
- $passwd->notEmpty();
- $repPasswd = (new Password('repeat_password'))->addValidator(new RepeatPasswordValidator());
- $repPasswd->notEmpty();
- $this->generateDoubleSection([$passwd, $repPasswd]);
- /* di('lang')->absoluteT('dnsinfomessage') ? $message = di('lang')->absoluteT('dnsinfomessage') :
- $message = 'DNS Informations for <b id="infoalertmaildomain" class="lu-alert--lg"></b>
- <div id="addalertheader" class="lu-alert--lg"></div>
- <div id="addmxmessage"></div>
- <div id="addspfmessage"></div>
- <div id="adddmarcmessage"></div>
- <div id="adddkimmessage"></div><br><br>
- <div id="addalertfooter"></div>
- <div class="lu-form-group">
- <label class="lu-form-label">DNS Record Type</label>
- <div class="lu-input-group" style="background:#eeeeee">
- <input type="text" value="ThurData Recommended" readonly="readonly" class="lu-form-control" style="">
- <div class="lu-input-group__addon">⇔</div>
- <input type="text" value="Current Value" readonly="readonly" class="lu-form-control" style="">
- </div>
- </div>';
- $this->addInternalAlert($message, null, 100);
- $row = new InputGroup('MX');
- $row->addInputComponent((new InputGroupElements\Text('mxthurdata'))->addHtmlAttribute('readonly','true'));
- $row->addInputAddon('', false, '⇔');
- $row->addInputComponent((new InputGroupElements\Text('mxactive'))->addHtmlAttribute('readonly','true'));
- $this->addSection($row);
- $row = new InputGroup('SPF');
- $row->addInputComponent((new InputGroupElements\Text('spfthurdata'))->addHtmlAttribute('readonly','true'));
- $row->addInputAddon('', false, '⇔');
- $row->addInputComponent((new InputGroupElements\Text('spf'))->addHtmlAttribute('readonly','true'));
- $this->addSection($row);
- $row = new InputGroup('DMARC');
- $row->addInputComponent((new InputGroupElements\Text('dmarcthurdata'))->addHtmlAttribute('readonly','true'));
- $row->addInputAddon('', false, '⇔');
- $row->addInputComponent((new InputGroupElements\Text('dmarc'))->addHtmlAttribute('readonly','true'));
- $this->addSection($row);
- $row = new InputGroup('DKIM');
- $row->addInputComponent((new InputGroupElements\Text('dkimthurdata'))->addHtmlAttribute('readonly','true'));
- $row->addInputAddon('', false, '⇔');
- $row->addInputComponent((new InputGroupElements\Text('dkim'))->addHtmlAttribute('readonly','true'));
- $this->addSection($row);
- $this->generateDoubleSection([new Hidden('infomaildomain'), new Hidden('id')]);
- $this->generateDoubleSection([new Hidden('selfdns'), new Hidden('dnsok')]); */
- }
- }
|