mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaCloneObjectForm: more intuitive handling
This commit is contained in:
parent
56c357bfb0
commit
d26a7b07da
@ -14,6 +14,7 @@ class IcingaCloneObjectForm extends QuickForm
|
|||||||
$this->addElement('text', 'new_object_name', array(
|
$this->addElement('text', 'new_object_name', array(
|
||||||
'label' => 'New name',
|
'label' => 'New name',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'value' => $this->object->object_name,
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->addElement('select', 'clone_type', array(
|
$this->addElement('select', 'clone_type', array(
|
||||||
@ -37,6 +38,12 @@ class IcingaCloneObjectForm extends QuickForm
|
|||||||
$object = $this->object;
|
$object = $this->object;
|
||||||
$newname = $this->getValue('new_object_name');
|
$newname = $this->getValue('new_object_name');
|
||||||
$resolve = $this->getValue('clone_type') === 'flat';
|
$resolve = $this->getValue('clone_type') === 'flat';
|
||||||
|
|
||||||
|
$this->setSuccessUrl(
|
||||||
|
'director/' . strtolower($object->getShortTableName()),
|
||||||
|
array('name' => $newname)
|
||||||
|
);
|
||||||
|
|
||||||
$msg = sprintf(
|
$msg = sprintf(
|
||||||
'The %s "%s" has been cloned from "%s"',
|
'The %s "%s" has been cloned from "%s"',
|
||||||
$object->getShortTableName(),
|
$object->getShortTableName(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user