mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing problem with submit options in FormHelper::end() (ticket #2516)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4987 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
90e05ed48e
commit
9b18367fcc
2 changed files with 6 additions and 3 deletions
|
@ -214,9 +214,9 @@ class FormHelper extends AppHelper {
|
|||
$submitOptions = $options['submit'];
|
||||
unset($options['submit']);
|
||||
|
||||
if(isset($submitOptions['label'])) {
|
||||
$submit = $submitOptions['label'];
|
||||
unset($submitOptions['label']);
|
||||
if(isset($options['label'])) {
|
||||
$submitOptions = $options['label'];
|
||||
unset($options['label']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -641,6 +641,9 @@ class FormHelperTest extends CakeTestCase {
|
|||
|
||||
function testFormEnd() {
|
||||
$this->assertEqual($this->Form->end(), '</form>');
|
||||
|
||||
$result = $this->Form->end(array('submit' => 'save'));
|
||||
$this->assertEqual($result, '<div class="submit"><input type="submit" value="save" /></div></form>');
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
|
|
Loading…
Add table
Reference in a new issue