Skip to content

Commit

Permalink
fixed submit options
Browse files Browse the repository at this point in the history
  • Loading branch information
slywalker committed Nov 13, 2012
1 parent ea34939 commit 8014a20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Test/Case/View/Helper/BootstrapFormHelperTest.php
Expand Up @@ -49,9 +49,9 @@ public function testCreate() {
* @return void
*/
public function testSubmit() {
$form = $this->BootstrapForm->submit();
$form = $this->BootstrapForm->submit('Submit');
$expected = '<div class="form-actions">' .
'<button type="submit" class="btn" div="form-actions"></button></div>';
'<button type="submit" class="btn">Submit</button></div>';
$this->assertSame($expected, $form);
}

Expand Down
1 change: 1 addition & 0 deletions View/Helper/BootstrapFormHelper.php
Expand Up @@ -176,6 +176,7 @@ public function submit($caption = null, $options = array()) {
unset($options['icon']);
}
$div = $this->_extractOption('div', $options);
unset($options['div']);
$out = $this->button($caption, $options);
return (false === $div) ? $out : $this->Html->div($div, $out);
}
Expand Down

0 comments on commit 8014a20

Please sign in to comment.