mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
small change to allow onSubmit pass strict validation, fixes #4311
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6961 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0db9a4ca00
commit
5047963a77
1 changed files with 3 additions and 3 deletions
|
@ -195,10 +195,10 @@ class FormHelper extends AppHelper {
|
|||
unset($options['type'], $options['action']);
|
||||
|
||||
if ($options['default'] == false) {
|
||||
if (isset($htmlAttributes['onSubmit'])) {
|
||||
$htmlAttributes['onSubmit'] .= ' event.returnValue = false; return false;';
|
||||
if (isset($htmlAttributes['onSubmit']) || isset($htmlAttributes['onsubmit'])) {
|
||||
$htmlAttributes['onsubmit'] .= ' event.returnValue = false; return false;';
|
||||
} else {
|
||||
$htmlAttributes['onSubmit'] = 'event.returnValue = false; return false;';
|
||||
$htmlAttributes['onsubmit'] = 'event.returnValue = false; return false;';
|
||||
}
|
||||
}
|
||||
unset($options['default']);
|
||||
|
|
Loading…
Reference in a new issue