Form errors in LeftAndMain response negotiation

The session key for form errors changed from "Form_EditForm" to "CMSForm_EditForm",
causing a mismatch. See https://github.com/silverstripe/silverstripe-framework/pull/2084/files#r6338249 for discussion
This commit is contained in:
Ingo Schommer 2013-09-18 13:55:30 +02:00
parent 3a17e168cc
commit 1bb993b0b3
2 changed files with 7 additions and 0 deletions

View File

@ -37,4 +37,9 @@ class CMSForm extends Form {
return $this->responseNegotiator;
}
public function FormName() {
if($this->htmlID) return $this->htmlID;
else return 'Form_' . str_replace(array('.', '/'), '', $this->name);
}
}

View File

@ -241,6 +241,8 @@ class Form extends RequestHandler {
if(isset($errorInfo['message']) && isset($errorInfo['type'])) {
$this->setMessage($errorInfo['message'], $errorInfo['type']);
}
return $this;
}
/**