Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Override theme_button
- function phptemplate_button($element) {
- // Make sure not to overwrite classes.
- if (isset($element['#attributes']['class'])) {
- $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'];
- }
- else {
- $element['#attributes']['class'] = 'form-'. $element['#button_type'];
- }
- if ($element['#id'] == 'my_id') {
- $my_type = 'button';
- }
- else {
- $my_type = 'submit';
- }
- // We here wrap the output with a couple span tags
- return '<span class="button"><span><input type="'. $my_type .'"'. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'].'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." /></span></span>\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement