| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?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\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\Providers\EditRessourceDataProvider;
- use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections\EditAdditionalSection;
- use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections\EditGeneralSection;
- use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
- 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\Modals\BaseEditModal;
- use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\InputGroupElements;
- /**
- *
- * Created by PhpStorm.
- * User: ThurData
- * Date: 18.09.19
- * Time: 09:29
- * Class EditRessourceForm
- */
- class EditRessourceForm extends SortedFieldForm implements ClientArea
- {
- use FormExtendedTrait;
- protected $id = 'editRessourceForm';
- protected $name = 'editRessourceForm';
- protected $title = 'editRessourceForm';
- public function initContent()
- {
- $this->setFormType(FormConstants::UPDATE);
- $this->setProvider(new EditRessourceDataProvider());
- $this->initFields();
- $this->loadDataToForm();
- }
- public function initFields()
- {
- $email = new InputGroup('usernameGroup');
- $email->addTextField('name', false, true)->addHtmlAttribute('readonly','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')]);
- }
- }
|