Returns HTML for a button form element.
$variables: An associative array containing:
The #button_type property accepts any value, though core themes have css that styles the following button_types appropriately: 'primary', 'danger'.
function theme_button($variables) {
$element = $variables['element'];
$element['#attributes']['type'] = 'submit';
element_set_attributes($element, array(
'id',
'name',
'value',
));
$element['#attributes']['class'][] = 'form-button';
if (!empty($element['#button_type'])) {
$element['#attributes']['class'][] = 'form-button-' . $element['#button_type'];
}
// @todo Various JavaScript depends on this button class.
$element['#attributes']['class'][] = 'form-submit';
if (!empty($element['#attributes']['disabled'])) {
$element['#attributes']['class'][] = 'form-button-disabled';
}
return '<input' . new Attribute($element['#attributes']) . ' />';
}