From 0544be3aec3622cdd045923d577fad612cfa7e36 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 15 Oct 2015 17:52:02 +0200 Subject: [PATCH] QuickForm: allow params for successUrl --- library/Director/Web/Form/QuickForm.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/Director/Web/Form/QuickForm.php b/library/Director/Web/Form/QuickForm.php index accf083d..cfebfc3d 100644 --- a/library/Director/Web/Form/QuickForm.php +++ b/library/Director/Web/Form/QuickForm.php @@ -205,8 +205,14 @@ abstract class QuickForm extends Zend_Form ) + $enum; } - public function setSuccessUrl($url) + public function setSuccessUrl($url, $params = null) { + if (! $url instanceof Url) { + $url = Url::fromPath($url); + } + if ($params !== null) { + $url->setParams($params); + } $this->successUrl = $url; return $this; }