mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
QuickForm: add getSuccessUrl()
This commit is contained in:
parent
e098f1bbb0
commit
a39c8c3280
@ -211,6 +211,16 @@ abstract class QuickForm extends Zend_Form
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSuccessUrl()
|
||||
{
|
||||
$url = $this->successUrl ?: $this->getAction();
|
||||
if (! $url instanceof Url) {
|
||||
$url = Url::fromPath($url);
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
}
|
||||
@ -331,7 +341,7 @@ abstract class QuickForm extends Zend_Form
|
||||
|
||||
public function redirectOnSuccess($message = null)
|
||||
{
|
||||
$url = $this->successUrl ?: $this->getAction();
|
||||
$url = $this->getSuccessUrl();
|
||||
$this->notifySuccess($this->getSuccessMessage($message));
|
||||
$this->redirectAndExit($url);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user