mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
parent
0f1e0c182f
commit
f818cb3eb6
@ -122,12 +122,6 @@ abstract class ObjectController extends ActionController
|
|||||||
$this->view->form = $form = $this->loadForm($formName)->setDb($this->db());
|
$this->view->form = $form = $this->loadForm($formName)->setDb($this->db());
|
||||||
$form->setObject($object);
|
$form->setObject($object);
|
||||||
|
|
||||||
$url = Url::fromPath(
|
|
||||||
sprintf('director/%s', $type),
|
|
||||||
array('name' => $object->object_name)
|
|
||||||
);
|
|
||||||
$form->setSuccessUrl($url);
|
|
||||||
|
|
||||||
$this->view->title = sprintf($this->translate('Modify %s'), ucfirst($ltype));
|
$this->view->title = sprintf($this->translate('Modify %s'), ucfirst($ltype));
|
||||||
$this->view->form->handleRequest();
|
$this->view->form->handleRequest();
|
||||||
|
|
||||||
|
@ -507,12 +507,6 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
if (! $object->hasBeenLoadedFromDb()) {
|
if (! $object->hasBeenLoadedFromDb()) {
|
||||||
|
|
||||||
$this->setHttpResponseCode(201);
|
$this->setHttpResponseCode(201);
|
||||||
if ($object instanceof IcingaObject && $object->hasProperty('object_name')) {
|
|
||||||
$this->setSuccessUrl(
|
|
||||||
'director/' . strtolower($this->getObjectName()),
|
|
||||||
array('name' => $object->object_name)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$msg = sprintf(
|
$msg = sprintf(
|
||||||
$object->hasBeenLoadedFromDb()
|
$object->hasBeenLoadedFromDb()
|
||||||
@ -527,6 +521,12 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
}
|
}
|
||||||
$msg = $this->translate('No action taken, object has not been modified');
|
$msg = $this->translate('No action taken, object has not been modified');
|
||||||
}
|
}
|
||||||
|
if ($object instanceof IcingaObject && $object->hasProperty('object_name')) {
|
||||||
|
$this->setSuccessUrl(
|
||||||
|
'director/' . strtolower($this->getObjectName()),
|
||||||
|
array('name' => $object->object_name)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->redirectOnSuccess($msg);
|
$this->redirectOnSuccess($msg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user