andre 2 лет назад
Родитель
Сommit
9758c17d3c

+ 0 - 4
app/UI/Client/Ressource/Providers/DeleteRessourceDataProvider.php

@@ -2,10 +2,6 @@
 
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Providers;
 
-
-use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
-use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Delete\DeleteRessource;
 use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
 use ThurData\Servers\KerioEmail\Api\KerioWhmcs;

+ 0 - 11
app/UI/Client/Ressource/Providers/EditRessourceDataProvider.php

@@ -2,19 +2,8 @@
 
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Providers;
 
-
 use ThurData\Servers\KerioEmail\App\Enums\Kerio;
-use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
-use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\Ressource;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\ClassOfService;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository\ClassOfServices;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Response;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Services\Update\UpdateRessource;
-use ThurData\Servers\KerioEmail\App\Services\ConfigurableOptions\Strategy\Types\ClassOfServicesOptions;
 use function ThurData\Servers\KerioEmail\Core\Helper\di;
-use ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting;
 use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
 use ThurData\Servers\KerioEmail\Api\KerioWhmcs;

+ 1 - 19
app/UI/Client/Ressource/Providers/RessourceDataProvider.php

@@ -1,19 +1,8 @@
 <?php
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Providers;
-use ThurData\Servers\KerioEmail\App\Enums\ProductParams;
-use ThurData\Servers\KerioEmail\App\Enums\Size;
+
 use ThurData\Servers\KerioEmail\App\Enums\Kerio;
-use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
-use ThurData\Servers\KerioEmail\App\Http\Admin\ProductConfiguration;
-use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Helpers\ServiceFactory;
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\Ressource;
-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\Services\ConfigurableOptions\Strategy\Types\ClassOfServicesOptions;
 use function ThurData\Servers\KerioEmail\Core\Helper\di;
-use ThurData\Servers\KerioEmail\Core\Http\JsonResponse;
-use ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting;
 use ThurData\Servers\KerioEmail\Core\UI\ResponseTemplates\HtmlDataJsonResponse;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\DataProviders\BaseDataProvider;
 use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
@@ -31,13 +20,6 @@ class RessourceDataProvider extends BaseDataProvider
 
     public function read()
     {
-        /**
-         * hosting id
-         */
-        $hid = $this->request->get('id');
-
-        $hosting = Hosting::where('id', $hid)->first();
-        //todo refactor
         $this->data['domain'] = $hosting->domain;
 
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');

+ 0 - 4
app/UI/Client/Ressource/Sections/AdditionalSection.php

@@ -2,13 +2,9 @@
 
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections;
 
-
 use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
 use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\FreeFieldsSection;
-use function ThurData\Servers\KerioEmail\Core\Helper\di;
 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;
 
 /**
  *

+ 0 - 1
app/UI/Client/Ressource/Sections/EditAdditionalSection.php

@@ -2,7 +2,6 @@
 
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\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\Text;

+ 0 - 14
app/UI/Client/Ressource/Sections/EditGeneralSection.php

@@ -2,9 +2,6 @@
 
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections;
 
-
-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\Sections\FreeFieldsSection;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
@@ -31,17 +28,6 @@ class EditGeneralSection extends FreeFieldsSection
 
     public function initContent()
     {
-        /**
-         * hosting id
-         */
-        $hid = $this->getRequestValue('id');
-
-        /**
-         * product manager allow to check product settings
-         */
-        $productManager = new ProductManager();
-        $productManager->loadByHostingId($hid);
-
         /**
          * add fields
          */

+ 1 - 19
app/UI/Client/Ressource/Sections/GeneralSection.php

@@ -1,17 +1,10 @@
 <?php
 namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Sections;
-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\Sections\FreeFieldsSection;
-use ThurData\Servers\KerioEmail\App\Validators\PasswordsValidator;
-use ThurData\Servers\KerioEmail\App\Validators\RepeatPasswordValidator;
-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\Fields\Switcher;
-use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Number;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\InputGroup;
 use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\InputGroupElements;
 
@@ -32,17 +25,6 @@ class GeneralSection extends FreeFieldsSection
 
     public function initContent()
     {
-        /**
-         * hosting id
-         */
-        $hid = $this->getRequestValue('id');
-
-        /**
-         * product manager allow to check product settings
-         */
-        $productManager = new ProductManager();
-        $productManager->loadByHostingId($hid);
-
         $email = new InputGroup('usernameGroup');
 
         $email->addTextField('name', false, true);