mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2533 from kinglozzer/2527-cmsform-inlineformactions
Allow non-action buttons to pass through validation (fixes #2527)
This commit is contained in:
commit
fa22aedbed
@ -15,8 +15,9 @@ class CMSForm extends Form {
|
||||
* @return boolean
|
||||
*/
|
||||
public function validate() {
|
||||
$buttonClicked = $this->buttonClicked();
|
||||
return (
|
||||
in_array($this->buttonClicked()->actionName(), $this->getValidationExemptActions())
|
||||
($buttonClicked && in_array($buttonClicked->actionName(), $this->getValidationExemptActions()))
|
||||
|| parent::validate()
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user