DataField: Add Controller for Data (Field, List etc)

This commit is contained in:
Alexander Fuhr 2015-07-03 11:20:58 +02:00
parent 83fdf0f67d
commit 6203585a6f
4 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,14 @@
<?php
use Icinga\Module\Director\Web\Controller\ActionController;
use Icinga\Module\Director\Forms\DirectorDatafieldForm;
class Director_DataController extends ActionController
{
public function addfieldAction()
{
$form = new DirectorDatafieldForm();
$this->view->form = $form;
}
}

View File

@ -23,7 +23,7 @@ class Director_ListController extends ActionController
public function datafieldAction()
{
$this->view->addLink = $this->view->qlink(
$this->translate('Add'),
$this->translate('Add field'),
'director/data/addfield'
);

View File

@ -2,9 +2,9 @@
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
use Icinga\Module\Director\Web\Form\QuickForm;
class DirectorDatafieldForm extends DirectorObjectForm
class DirectorDatafieldForm extends QuickForm
{
public function setup()
{

View File

@ -0,0 +1,7 @@
<div class="controls">
<?= $this->tabs ?>
</div>
<div class="content" data-base-target="_next">
<?= $form; ?>
</div>