Skip to content

Commit

Permalink
Remove redirect URL from Form
Browse files Browse the repository at this point in the history
Redirecting is not the responsibility of the form, but of the
controller.
  • Loading branch information
lippserd committed Oct 21, 2022
1 parent 97ef23d commit 1f39e84
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ class Form extends BaseHtmlElement
/** @var ServerRequestInterface The server request being processed */
protected $request;

/** @var string */
protected $redirectUrl;

protected $tag = 'form';

/**
Expand Down Expand Up @@ -150,30 +147,6 @@ public function getRequest()
return $this->request;
}

/**
* Get the url to redirect to on success
*
* @return string
*/
public function getRedirectUrl()
{
return $this->redirectUrl;
}

/**
* Set the url to redirect to on success
*
* @param string $url
*
* @return $this
*/
public function setRedirectUrl($url)
{
$this->redirectUrl = $url;

return $this;
}

/**
* @param ServerRequestInterface $request
*
Expand Down Expand Up @@ -368,7 +341,6 @@ protected function onError()

protected function onSuccess(FormSubmitElement $submitElement = null)
{
// $this->redirectOnSuccess();
}

protected function onElementRegistered(FormElement $element)
Expand Down

0 comments on commit 1f39e84

Please sign in to comment.