<?php
 namespace Modules\Admin\Config\Services\AgencyCostCenters; class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $form = \Engine\Form\General::create(); $form->setStyle('width', 250); $fieldset=\Engine\Form\Container\Fieldset::create(); $form->addContainer($fieldset); $fld=new \Engine\Form\Input\Text($this->lang['fields_code'], 'id', $this->values['id']); $fld->setMandatory(); if ($this->controller->getAction()=='update') { $fld->setDisabled(true); } $fld->setValidatorParam('maxLength', 20); $fieldset->addElement($fld); $fld=new \Engine\Form\Input\Text($this->lang['fields_name'], 'name', $this->values['name']); $fld->setMandatory(); $fld->setValidatorParam('maxLength', 50); $fieldset->addElement($fld); $form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1)); return $form; } }