Set button type, unless it's been specified
This commit is contained in:
1 parent
47a9d8e9ee
commit
daa9fbe5c5
1 file changed
+5
@@ -526,6 +526,11 @@ class FormBuilder {
|
|||||||
*/
|
*/
|
||||||
public function button($value = null, $options = array())
|
public function button($value = null, $options = array())
|
||||||
{
|
{
|
||||||
|
if ( ! array_key_exists('type', $options) )
|
||||||
|
{
|
||||||
|
$options['type'] = 'button';
|
||||||
|
}
|
||||||
|
|
||||||
return '<button'.Html::attributes($options).'>'.e($value).'</button>';
|
return '<button'.Html::attributes($options).'>'.e($value).'</button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user