Ver Fonte

add ressources

andre há 2 anos atrás
pai
commit
69399643e3

+ 1 - 2
app/UI/Client/Ressource/Forms/AddRessourceForm.php

@@ -23,6 +23,7 @@ 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;
+use ThurData\Servers\KerioEmail\Api\KerioWhmcs;
 
 /**
  *
@@ -51,8 +52,6 @@ class AddRessourceForm extends SortedFieldForm implements ClientArea
     public function initFields()
     {
         $this->addSection(new GeneralSection());
-        $this->addSection(new AdditionalSection());
-
 
     }
 }

+ 2 - 25
app/UI/Client/Ressource/Sections/GeneralSection.php

@@ -50,32 +50,9 @@ class GeneralSection extends FreeFieldsSection
         $email->addInputComponent((new InputGroupElements\Text('domain'))->addHtmlAttribute('readonly','true'));
         $this->addSection($email);
 
-        $this->generateDoubleSection([new Text('display_name'), new Select('status')]);
+        $this->generateDoubleSection([new Text('description'), new Select('type')]);
 
-        $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]);
-
-        $type = new Select('type');
-        $capacity = new Text('capacity');
-
-        $this->generateDoubleSection([$type, $capacity]);
-
-        $field = new Text('description');
-        $this->addField($field);
-
-        $field = new Text('notes');
-        $this->addField($field);
-
-        $autoAcceptDecline = (new Switcher('auto_accept'))->setDefaultValue('on');
-        $autoDeclineBusy = (new Switcher('auto_busy'))->setDefaultValue('on');
-        $this->generateDoubleSection([$autoAcceptDecline, $autoDeclineBusy]);
+        $this->generateDoubleSection([new Text('manager'), new Select('status')]);
 
     }
 }