Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function phptemplate_button($element) {
- if (isset($element['#attributes']['class'])) {
- $element['#attributes']['class'] = 'form-'. $element['#button_type'] .' '. $element['#attributes']['class'];
- }
- else {
- $element['#attributes']['class'] = 'form-'. $element['#button_type'];
- }
- $return_string = '<input ';
- if ($element['#button_type'] == 'image') {
- $return_string .= 'type="image" ';
- }
- else {
- $return_string .= 'type="submit" ';
- }
- $return_string .= (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";;
- return $return_string;
- }
- ?>
Add Comment
Please, Sign In to add comment