Datafield: fix links and redirections

fixes #1847
This commit is contained in:
Thomas Gelf 2019-04-29 10:43:51 +02:00
parent 2fc79e1ecb
commit baa3ae248f
3 changed files with 7 additions and 2 deletions

View File

@ -58,13 +58,17 @@ class DataController extends ActionController
public function fieldsAction()
{
$this->setAutorefreshInterval(10);
$this->tabs(new DataTabs())->activate('datafield');
$this->addTitle($this->translate('Data Fields'));
$this->actions()->add(Link::create(
$this->translate('Add'),
'director/datafield/add',
null,
['class' => 'icon-plus']
[
'class' => 'icon-plus',
'data-base-target' => '_next',
]
));
(new DatafieldTable($this->db()))->renderTo($this);

View File

@ -26,7 +26,6 @@ class DatafieldController extends ActionController
}
$form = DirectorDatafieldForm::load()
->setSuccessUrl('director/data/fields')
->setDb($this->db());
if ($edit) {

View File

@ -13,6 +13,8 @@ class DirectorDatafieldForm extends DirectorObjectForm
{
protected $objectName = 'Data field';
protected $listUrl = 'director/data/fields';
protected function onRequest()
{
if ($this->hasBeenSent()) {