1) { return '
'; } } function balsami_checkbox($variables) { // return theme('form_element', $element, $checkbox); $element = $variables['element']; $t = get_t(); $element['#attributes']['type'] = 'checkbox'; element_set_attributes($element, array('id', 'name','#return_value' => 'value')); // Unchecked checkbox has #value of integer 0. if (!empty($element['#checked'])) { $element['#attributes']['checked'] = 'checked'; } _form_set_class($element, array('form-checkbox')); return ''; } function balsami_radio($element) { _form_set_class($element, array('form-radio')); $output = ''; if (!is_null($element['#title'])) { $output = '' . $output; } unset($element['#title']); return theme('form_element', $element, $output); } // function balsami_select($variables) { // $element = $variables['element']; // $select = ''; // $size = !empty($element['#size']) ? ' size="' . $element['#size'] . '"' : ''; // _form_set_class($element, array('form-select')); // $multiple = $element['#multiple']; // //return theme('form_element', $element, ''); // return ''; // } function balsami_button($element) { if (!empty($element['element'])) { return balsami_button($element['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']; } return '\n"; } function balsami_password($variables) { $element = $variables['element']; $size = !empty($element['#size']) ? ' size="' . $element['#size'] . '" ' : ''; $maxlength = $element['#maxlength'] ? ' maxlength="' . $element['#maxlength'] . '" ' : ''; _form_set_class($element, array('form-text')); $output = ''; return $output; //return theme('form_element', $element, $output); } function balsami_textfield($variables) { $element = $variables['element']; $element['#attributes']['type'] = 'text'; element_set_attributes($element, array('id', 'name', 'value', 'size', 'maxlength')); _form_set_class($element, array('form-text')); $extra = ''; if ($element['#autocomplete_path'] && drupal_valid_path($element['#autocomplete_path'])) { drupal_add_library('system', 'drupal.autocomplete'); $element['#attributes']['class'][] = 'form-autocomplete'; $attributes = array(); $attributes['type'] = 'hidden'; $attributes['id'] = $element['#attributes']['id'] . '-autocomplete'; $attributes['value'] = url($element['#autocomplete_path'], array('absolute' => TRUE)); $attributes['disabled'] = 'disabled'; $attributes['class'][] = 'autocomplete'; $extra = ''; } $output = ''; return '' . $output . $extra . ''; } function balsami_file($element) { _form_set_class($element, array('form-file')); return theme('form_element', $element, '$block[description]
$block[content]