$attributes = '', $required = FALSE, $extra = NULL
) {
// Normalize this property
- if ($type == 'select' && !empty($extra['multiple'])) {
+ if ($type == 'select' && is_array($extra) && !empty($extra['multiple'])) {
$extra['multiple'] = 'multiple';
}
$element = $this->addElement($type, $name, $label, $attributes, $extra);
$attrs = array_merge($js, $attrs);
}
+ if ($button['type'] === 'cancel') {
+ $attrs['class'] .= ' cancel';
+ }
+
if ($button['type'] === 'reset') {
$prevnext[] = $this->createElement($button['type'], 'reset', $button['name'], $attrs);
}
$buttonName = $this->getButtonName($button['type']);
}
- if (in_array($button['type'], array(
- 'next', 'upload')) && $button['name'] === 'Save') {
+ if (in_array($button['type'], array('next', 'upload', 'done')) && $button['name'] === ts('Save')) {
$attrs = array_merge($attrs, (array('accesskey' => 'S')));
}
$prevnext[] = $this->createElement('submit', $buttonName, $button['name'], $attrs);