Skip to content
Permalink
Browse files

Add the possibility to use additional template vars for submitContainer.

  • Loading branch information...
Holt59 committed Dec 24, 2015
1 parent 5be4156 commit 1498886884335ea2d79f380564f10b6a8287bd32
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/View/Helper/FormHelper.php
@@ -1722,7 +1722,11 @@ public function submit($caption = null, array $options = [])
if (!is_string($caption) && empty($caption)) {
$caption = __d('cake', 'Submit');
}
$options += ['type' => 'submit', 'secure' => false];
$options += [
'type' => 'submit',
'secure' => false,
'templateVars' => []
];
if (isset($options['name'])) {
$this->_secure($options['secure'], $this->_secureFieldName($options['name']));
@@ -1765,11 +1769,12 @@ public function submit($caption = null, array $options = [])
$input = $this->formatTemplate('inputSubmit', [
'type' => $type,
'attrs' => $this->templater()->formatAttributes($options),
'attrs' => $this->templater()->formatAttributes($options)
]);
return $this->formatTemplate('submitContainer', [
'content' => $input
'content' => $input,
'templateVars' => $options['templateVars']
]);
}

0 comments on commit 1498886

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.