AddRessourceForm.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Forms;
  3. use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
  4. use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\ClassOfService;
  5. use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository\ClassOfServices;
  6. use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
  7. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
  8. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\RowSection;
  9. use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Providers\RessourceDataProvider;
  10. use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections\AdditionalSection;
  11. use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections\GeneralSection;
  12. use ThurData\Servers\KerioEmail\App\Validators\PasswordsValidator;
  13. use ThurData\Servers\KerioEmail\App\Validators\RepeatPasswordValidator;
  14. use function ThurData\Servers\KerioEmail\Core\Helper\di;
  15. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
  16. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\BaseForm;
  17. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
  18. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Password;
  19. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Select;
  20. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Text;
  21. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\FormConstants;
  22. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;
  23. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\InputGroup;
  24. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\InputGroupElements;
  25. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\RawSection;
  26. use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
  27. /**
  28. *
  29. * Created by PhpStorm.
  30. * User: ThurData
  31. * Date: 10.09.19
  32. * Time: 13:06
  33. * Class AddRessourceForm
  34. */
  35. class AddRessourceForm extends SortedFieldForm implements ClientArea
  36. {
  37. use FormExtendedTrait;
  38. protected $id = 'addRessourceForm';
  39. protected $name = 'addRessourceForm';
  40. protected $title = 'addRessourceForm';
  41. public function initContent()
  42. {
  43. $this->setFormType(FormConstants::CREATE);
  44. $this->setProvider(new RessourceDataProvider());
  45. $this->initFields();
  46. $this->loadDataToForm();
  47. }
  48. public function initFields()
  49. {
  50. $this->addSection(new GeneralSection());
  51. }
  52. }