\n". $element['#children'] ."\n\n"; } function mothership_form_element($element, $value) { // This is also used in the installer, pre-database setup. $t = get_t(); //$output = '
'; // removed $output = '
*' : ''; if (!empty($element['#title'])) { $title = $element['#title']; if (!empty($element['#id'])) { $output .= ' \n"; } else { $output .= ' \n"; } } $output .= " $value\n"; if (!empty($element['#description'])) { $output .= '
'. $element['#description'] ."
\n"; } $output .= "
\n"; return $output; } function mothership_file($element) { _form_set_class($element, array('form-file')); return theme('form_element', $element, ''); } function mothership_checkbox($element) { _form_set_class($element, array('form-checkbox')); $checkbox = ''; if (!is_null($element['#title'])) { $checkbox = ''; } unset($element['#title']); return theme('form_element', $element, $checkbox); } function mothership_button($element) { // Override theme_button adss spans around it so we can tweak the shit ouuta it //http://teddy.fr/blog/beautify-your-drupal-forms // 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']; } // We here wrap the output with a couple span tags return '\n"; } function mothership_fieldset($element) { $element['#attributes']['class'] .= ''.$element['#array_parents']['0']; if (!empty($element['#collapsible'])) { drupal_add_js('misc/collapse.js'); if (!isset($element['#attributes']['class'])) { $element['#attributes']['class'] = ''; } $element['#attributes']['class'] .= ' collapsible'; if (!empty($element['#collapsed'])) { $element['#attributes']['class'] .= ' collapsed'; } } return ''. ($element['#title'] ? ''. $element['#title'] .'' : '') . (isset($element['#description']) && $element['#description'] ? '
'. $element['#description'] .'
' : '') . (!empty($element['#children']) ? $element['#children'] : '') . (isset($element['#value']) ? $element['#value'] : '') ."\n"; }