<?php
 namespace Modules\Admin\DocumentTemplates; class View_Utils_FormClone extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $entCfg = \Entity\DocumentTemplate::loadCFG(); $form = \Engine\Form\General::create(); $fieldset = \Engine\Form\Container\Fieldset::create(); $form->addContainer($fieldset); $activeArr = ['1'=> $this->lang['formFields']['activeYes'], '0'=> $this->lang['formFields']['activeNo']]; $active = new \Engine\Form\Input\Radio($this->lang['formFields']['active'], 'active', $this->values['active']); $active->setPossibleValues($activeArr); $form->addElement($active); $name = new \Engine\Form\Input\Text($this->lang['formFields']['name'], 'name', $this->values['name']); $name->importFromConfig($entCfg['name']); $form->addElement($name); $docType = new \App\Form\Input\Select_DocumentType($this->lang['formFields']['docType'], 'docType', $this->values['docType']); $docType->importFromConfig($entCfg['docType']); $docType->setDefaultOptionText($this->lang['formFields']['docType_default']); $docType->setPivot($this->values['pivot']); $docType->showDefaultOption(true); $form->addElement($docType); $form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1)); return $form; } }