mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
3a17e168cc
commit
1bb993b0b3
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -241,6 +241,8 @@ class Form extends RequestHandler {
|
||||
if(isset($errorInfo['message']) && isset($errorInfo['type'])) {
|
||||
$this->setMessage($errorInfo['message'], $errorInfo['type']);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user