From d26a7b07dae352cd5ade2ab1bdb3373179a4ad3e Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 19 Jan 2016 16:43:26 +0100 Subject: [PATCH] IcingaCloneObjectForm: more intuitive handling --- application/forms/IcingaCloneObjectForm.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/forms/IcingaCloneObjectForm.php b/application/forms/IcingaCloneObjectForm.php index d76d9b9c..806452fb 100644 --- a/application/forms/IcingaCloneObjectForm.php +++ b/application/forms/IcingaCloneObjectForm.php @@ -14,6 +14,7 @@ class IcingaCloneObjectForm extends QuickForm $this->addElement('text', 'new_object_name', array( 'label' => 'New name', 'required' => true, + 'value' => $this->object->object_name, )); $this->addElement('select', 'clone_type', array( @@ -37,6 +38,12 @@ class IcingaCloneObjectForm extends QuickForm $object = $this->object; $newname = $this->getValue('new_object_name'); $resolve = $this->getValue('clone_type') === 'flat'; + + $this->setSuccessUrl( + 'director/' . strtolower($object->getShortTableName()), + array('name' => $newname) + ); + $msg = sprintf( 'The %s "%s" has been cloned from "%s"', $object->getShortTableName(),