Conform StatehistoryForm to new Form implementation

This commit is contained in:
Matthias Jentsch 2014-09-30 11:34:04 +02:00
parent 23c1097577
commit ac2aeca9e6
2 changed files with 5 additions and 13 deletions

View File

@ -370,8 +370,8 @@ class Monitoring_ListController extends Controller
$form->setEnctype(Zend_Form::ENCTYPE_URLENCODED); $form->setEnctype(Zend_Form::ENCTYPE_URLENCODED);
$form->setMethod('get'); $form->setMethod('get');
$form->setTokenDisabled(); $form->setTokenDisabled();
$form->setRequest($this->getRequest()); $form->setUidDisabled();
$form->buildForm(); $form->render();
$this->view->form = $form; $this->view->form = $form;
$orientation = $this->params->shift('horizontal', 0) ? 'horizontal' : 'vertical'; $orientation = $this->params->shift('horizontal', 0) ? 'horizontal' : 'vertical';
@ -391,11 +391,7 @@ class Monitoring_ListController extends Controller
'stateHistorySummary', 'stateHistorySummary',
array('day', $form->getValue('state')) array('day', $form->getValue('state'))
); );
$this->params->shift('objecttype'); $this->params->remove(array('objecttype', 'from', 'to', 'state', 'btn_submit'));
$this->params->shift('from');
$this->params->shift('to');
$this->params->shift('state');
$this->params->shift('btn_submit');
$this->applyFilters($query); $this->applyFilters($query);
$this->view->summary = $query->getQuery()->fetchAll(); $this->view->summary = $query->getQuery()->fetchAll();
$this->view->column = $form->getValue('state'); $this->view->column = $form->getValue('state');

View File

@ -48,11 +48,9 @@ class StatehistoryForm extends Form
} }
/** /**
* Create the confirmation form * @see Form::createElements()
*
* @see Form::create()
*/ */
public function create() public function createElements(array $formData)
{ {
$this->addElement( $this->addElement(
'select', 'select',
@ -137,8 +135,6 @@ class StatehistoryForm extends Form
) )
); );
} }
$this->enableAutoSubmit(array('from', 'objecttype', 'state'));
$this->addElement( $this->addElement(
'button', 'button',
'btn_submit', 'btn_submit',