FormAction updates, also fixing NoticeForm CSS

This commit is contained in:
Mikael Nordfeldth
2014-07-03 14:00:40 +02:00
parent 1f97376813
commit 2e77cbfa86
6 changed files with 51 additions and 93 deletions

View File

@@ -98,6 +98,26 @@ class FormAction extends ManagedAction
return null;
}
public function showForm($msg=null, $success=false)
{
$this->msg = $msg;
$this->success = $success;
$this->showPage();
}
public function showContent()
{
$form = $this->getForm();
$form->show();
}
protected function getForm()
{
$class = $this->form.'Form';
$form = new $class($this);
return $form;
}
/**
* Gets called from handle() if isPost() is true;
* @return void