<?php
 namespace Modules\Utils\AppReports; class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract { public function getForm() { $form = \Engine\Form\General::create(); $fieldset=\Engine\Form\Container\Fieldset::create("Application report"); $form->addContainer($fieldset); $fld = new \Engine\Form\Input\Text("Name", 'name', $this->values['name']); $fld->setMandatory(true); if ($this->controller->getAction()=="update") { $fld->setDisabled(); } $fieldset->addElement($fld); $fld = new \Engine\Form\Input\Textarea("Sql", 'sql', $this->values['sql']); $fld->setMandatory(true); $fld->setDetails("Use [TABLE_YYYYMM] or [YYYYMM] in SQL to get a union of all monthly tables."); $fieldset->addElement($fld); $fld = new \Engine\Form\Input\Text("Monthly table", 'monthTable', $this->values['monthTable']); $fieldset->addElement($fld); $form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1)); return $form; } }