Merge pull request #2533 from kinglozzer/2527-cmsform-inlineformactions

Allow non-action buttons to pass through validation (fixes #2527)
This commit is contained in:
Ingo Schommer 2013-10-16 02:41:23 -07:00
commit fa22aedbed

View File

@ -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()
);
}