BUG Regression in Form->clearMessage() (fixes #8186)

See 729bcc9
This commit is contained in:
Ingo Schommer 2013-01-15 14:25:07 +01:00
parent 64d3a3dafc
commit 014f541a89

View File

@ -1319,17 +1319,15 @@ class Form extends RequestHandler {
* than <% control FormObject %> * than <% control FormObject %>
*/ */
public function forTemplate() { public function forTemplate() {
return $this->renderWith(array_merge(
(array)$this->getTemplate(),
array('Form')
));
// Now that we're rendered, clear message // Now that we're rendered, clear message
Session::clear("FormInfo.{$this->FormName()}.errors"); Session::clear("FormInfo.{$this->FormName()}.errors");
Session::clear("FormInfo.{$this->FormName()}.formError"); Session::clear("FormInfo.{$this->FormName()}.formError");
Session::clear("FormInfo.{$this->FormName()}.data"); Session::clear("FormInfo.{$this->FormName()}.data");
return $result; return $this->renderWith(array_merge(
(array)$this->getTemplate(),
array('Form')
));
} }
/** /**