mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2429 from chillu/pulls/cms-validation
Form errors in LeftAndMain response negotiation
This commit is contained in:
commit
eb3cd197ac
@ -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