Permalink
Browse files

Remove type as a separarte option.

Some FormHelper tests want to make buttons with no type. Therefore, it
cannot be a required attribute.
  • Loading branch information...
1 parent b91fd84 commit d83c3050a847740325c52e2a1fbbaffa25bc39b3 @markstory markstory committed Feb 17, 2014
Showing with 2 additions and 3 deletions.
  1. +1 −2 src/View/Widget/Button.php
  2. +1 −1 tests/TestCase/View/Widget/ButtonTest.php
View
3 src/View/Widget/Button.php
@@ -64,8 +64,7 @@ public function render(array $data) {
];
return $this->_templates->format('button', [
'text' => $data['escape'] ? h($data['text']) : $data['text'],
- 'type' => $data['type'],
- 'attrs' => $this->_templates->formatAttributes($data, ['type', 'text']),
+ 'attrs' => $this->_templates->formatAttributes($data, ['text']),
]);
}
View
2 tests/TestCase/View/Widget/ButtonTest.php
@@ -26,7 +26,7 @@ class ButtonTest extends TestCase {
public function setUp() {
parent::setUp();
$templates = [
- 'button' => '<button type="{{type}}"{{attrs}}>{{text}}</button>',
+ 'button' => '<button{{attrs}}>{{text}}</button>',
];
$this->templates = new StringTemplate($templates);
}

0 comments on commit d83c305

Please sign in to comment.