Set button type, unless it's been specified

This commit is contained in:
Christoph Menke committed 2013-03-26 09:53:28 +01:00
1 parent 47a9d8e9ee
commit daa9fbe5c5
1 file changed
+5
+5
View File
@@ -526,6 +526,11 @@ class FormBuilder {
*/
public function button($value = null, $options = array())
{
if ( ! array_key_exists('type', $options) )
{
$options['type'] = 'button';
}
return '<button'.Html::attributes($options).'>'.e($value).'</button>';
}