BUG Form session message clearing regression

Regression originally from 729bcc95, but made visible by 014f541a8
This commit is contained in:
Ingo Schommer 2013-01-21 11:08:28 +01:00
parent 3d921e7459
commit 5d37d55f35

View File

@ -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;
} }
/** /**