<?php
namespace Modules\Admin\Config\CorporateGroupsManagement; class View_Utils_AddGroup extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $form = \Engine\Form\General::create(); $fieldset = \Engine\Form\Container\Fieldset::create($this->lang['index']['formFieldset']['editGroup']); $form->addContainer($fieldset); $groupName = new \Engine\Form\Input\Text($this->lang['index']['formFields']['groupName'], 'groupName', $this->values['groupName']); $groupName->setMandatory(); $fieldset->addElement($groupName); if ($this->values['action'] !== 'update') { $groupElements = new \Engine\Form\Input\Cloned_Text($this->lang['index']['formFields']['items'], 'groupElements', $this->values['groupElements']); $groupElements->setMandatory(); $fieldset->addElement($groupElements); } $form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1)); return $form; } }