DataField: add edit and add methods
This commit is contained in:
parent
a594116fe5
commit
edf25be971
|
@ -4,6 +4,16 @@ use Icinga\Module\Director\Web\Controller\ActionController;
|
||||||
|
|
||||||
class Director_DatafieldController extends ActionController
|
class Director_DatafieldController extends ActionController
|
||||||
{
|
{
|
||||||
|
public function addAction()
|
||||||
|
{
|
||||||
|
$this->forward('index', 'datafield', 'director');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function editAction()
|
||||||
|
{
|
||||||
|
$this->forward('index', 'datafield', 'director');
|
||||||
|
}
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$this->view->title = $this->translate('Add field');
|
$this->view->title = $this->translate('Add field');
|
||||||
|
@ -19,6 +29,7 @@ class Director_DatafieldController extends ActionController
|
||||||
if ($id = $this->params->get('id')) {
|
if ($id = $this->params->get('id')) {
|
||||||
$form->loadObject($id);
|
$form->loadObject($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
$this->render('object/form', null, true);
|
$this->render('object/form', null, true);
|
||||||
|
|
|
@ -17,7 +17,7 @@ class DatafieldTable extends QuickTable
|
||||||
|
|
||||||
protected function getActionUrl($row)
|
protected function getActionUrl($row)
|
||||||
{
|
{
|
||||||
return $this->url('director/datafield', array('id' => $row->id));
|
return $this->url('director/datafield/edit', array('id' => $row->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitles()
|
public function getTitles()
|
||||||
|
|
Loading…
Reference in New Issue