mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Form session message clearing regression
Regression originally from729bcc95
, but made visible by014f541a8
This commit is contained in:
parent
3d921e7459
commit
5d37d55f35
@ -1319,15 +1319,15 @@ class Form extends RequestHandler {
|
|||||||
* than <% control FormObject %>
|
* than <% control FormObject %>
|
||||||
*/
|
*/
|
||||||
public function forTemplate() {
|
public function forTemplate() {
|
||||||
// Now that we're rendered, clear message
|
$return = $this->renderWith(array_merge(
|
||||||
Session::clear("FormInfo.{$this->FormName()}.errors");
|
|
||||||
Session::clear("FormInfo.{$this->FormName()}.formError");
|
|
||||||
Session::clear("FormInfo.{$this->FormName()}.data");
|
|
||||||
|
|
||||||
return $this->renderWith(array_merge(
|
|
||||||
(array)$this->getTemplate(),
|
(array)$this->getTemplate(),
|
||||||
array('Form')
|
array('Form')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Now that we're rendered, clear message
|
||||||
|
$this->clearMessage();
|
||||||
|
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user