| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Forms;
- use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
- use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\ClassOfService;
- use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository\ClassOfServices;
- use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
- use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
- use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\RowSection;
- use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Providers\RessourceDataProvider;
- use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections\AdditionalSection;
- use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections\GeneralSection;
- use ThurData\Servers\KerioEmail\App\Validators\PasswordsValidator;
- use ThurData\Servers\KerioEmail\App\Validators\RepeatPasswordValidator;
- use function ThurData\Servers\KerioEmail\Core\Helper\di;
- use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\BaseForm;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Password;
- 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\FormConstants;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;
- 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\Sections\RawSection;
- /**
- *
- * Created by PhpStorm.
- * User: ThurData
- * Date: 10.09.19
- * Time: 13:06
- * Class AddRessourceForm
- */
- class AddRessourceForm extends SortedFieldForm implements ClientArea
- {
- use FormExtendedTrait;
- protected $id = 'addRessourceForm';
- protected $name = 'addRessourceForm';
- protected $title = 'addRessourceForm';
- public function initContent()
- {
- $this->setFormType(FormConstants::CREATE);
- $this->setProvider(new RessourceDataProvider());
- $this->initFields();
- $this->loadDataToForm();
- }
- public function initFields()
- {
- $email = new InputGroup('usernameGroup');
- $email->addTextField('name', false, true);
- $email->addInputAddon('emailSign', false, '@');
- $email->addInputComponent((new InputGroupElements\Text('domain'))->addHtmlAttribute('readonly','true'));
- $this->addSection($email);
- $this->generateDoubleSection([new Text('description'), new Select('type')]);
- $this->generateDoubleSection([new Select('manager'), new Select('status')]);
- }
- }
|