Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.230
diff -u -p -r1.230 filter.module
--- modules/filter/filter.module	14 Oct 2008 20:44:56 -0000	1.230
+++ modules/filter/filter.module	26 Oct 2008 21:20:14 -0000
@@ -477,57 +477,48 @@ function filter_form($value = FILTER_FOR
   $value = filter_resolve_format($value);
   $formats = filter_formats();
 
-  $extra = theme('filter_tips_more_info');
+  $form = array(
+    '#type' => 'fieldset',
+    '#weight' => $weight,
+    '#attributes' => array('class' => 'input-format-wrapper'),
+  );
 
   if (count($formats) > 1) {
-    $form = array(
-      '#type' => 'fieldset',
-      '#title' => t('Input format'),
-      '#collapsible' => TRUE,
-      '#collapsed' => TRUE,
-      '#weight' => $weight,
-      '#element_validate' => array('filter_form_validate'),
-    );
-    // Multiple formats available: display radio buttons with tips.
+    // Multiple formats available: display dropdown select list.
     foreach ($formats as $format) {
-      // Generate the parents as the autogenerator does, so we will have a
-      // unique id for each radio button.
-      $parents_for_id = array_merge($parents, array($format->format));
-      $form[$format->format] = array(
-        '#type' => 'radio',
-        '#title' => $format->name,
-        '#default_value' => $value,
-        '#return_value' => $format->format,
-        '#parents' => $parents,
-        '#description' => theme('filter_tips', _filter_tips($format->format, FALSE)),
-        '#id' => form_clean_id('edit-' . implode('-', $parents_for_id)),
-      );
+      $options[$format->format] = $format->name;
+      // TODO: Add these descriptions to the form as hidden markup. Then using
+      // jQuery, show the corresponding description when a format is selected.
+      $descriptions[$format->format] = theme('filter_tips', _filter_tips($format->format, FALSE));
     }
+    $element_id = form_clean_id('edit-' . implode('-', $parents));
+    $form['format'] = array(
+      '#type' => 'select',
+      '#title' => t('Input format'),
+      '#options' => $options,
+      '#default_value' => $value,
+      '#parents' => $parents,
+      '#id' => $element_id,
+      '#suffix' => '<div id="'. $element_id .'-help" class="input-format-help">'. theme('filter_tips_more_info', TRUE) .'</div>',
+    );
   }
   else {
     // Only one format available: use a hidden form item and only show tips.
     $format = array_shift($formats);
-    $form[$format->format] = array('#type' => 'value', '#value' => $format->format, '#parents' => $parents);
+    $form[$format->format] = array(
+      '#type' => 'value',
+      '#value' => $format->format,
+      '#parents' => $parents,
+    );
     $tips = _filter_tips(variable_get('filter_default_format', 1), FALSE);
     $form['format']['guidelines'] = array(
       '#title' => t('Formatting guidelines'),
-      '#markup' => theme('filter_tips', $tips, FALSE, $extra),
+      '#markup' => theme('filter_tips', $tips) . theme('filter_tips_more_info'),
     );
   }
-  $form[] = array('#markup' => $extra);
   return $form;
 }
 
-function filter_form_validate($form) {
-  foreach (element_children($form) as $key) {
-    if ($form[$key]['#value'] == $form[$key]['#return_value']) {
-      return;
-    }
-  }
-  form_error($form, t('An illegal choice has been detected. Please contact the site administrator.'));
-  watchdog('form', 'Illegal choice %choice in %name element.', array('%choice' => $form[$key]['#value'], '%name' => empty($form['#title']) ? $form['#parents'][0] : $form['#title']), WATCHDOG_ERROR);
-}
-
 /**
  * Returns TRUE if the user is allowed to access this format.
  */
@@ -580,8 +571,14 @@ function _filter_tips($format, $long = F
  *
  * @ingroup themeable
  */
-function theme_filter_tips_more_info() {
-  return '<p>' . l(t('More information about formatting options'), 'filter/tips') . '</p>';
+function theme_filter_tips_more_info($icon = FALSE) {
+  if ($icon) {
+    $description = t('More information about formatting options');
+    return l(theme('image', 'misc/help.png', $description, $description), 'filter/tips', array('html' => TRUE));
+  }
+  else {
+    return '<p>'. l(t('More information about formatting options'), 'filter/tips') .'</p>';
+  }
 }
 
 /**
Index: modules/system/system.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.css,v
retrieving revision 1.52
diff -u -p -r1.52 system.css
--- modules/system/system.css	19 Oct 2008 20:55:07 -0000	1.52
+++ modules/system/system.css	26 Oct 2008 21:20:14 -0000
@@ -348,6 +348,46 @@ html.js fieldset.collapsible .fieldset-w
 }
 
 /*
+** Input formats
+*/
+/* Align the Input format fieldset to its textarea */
+.input-format-wrapper {
+  margin-top: -1em;
+  margin-right: -2px;
+}
+/* Puts it all on one line and applies some margins and font weight */
+.input-format-wrapper .form-item {
+  float: left;
+  margin: 0;
+}
+.input-format-wrapper .form-item label {
+  float: left;
+  margin-right: 1em;
+  font-weight: normal;
+}
+.input-format-wrapper .form-item select {
+  float: left;
+  margin-right: 1em;
+}
+.input-format-help {
+  float: left;
+}
+/* Removes unaesthetic spacing at the bottom when only one input format is available */
+.input-format-wrapper p {
+  margin-bottom: 0;
+}
+/* To make the Input format fieldset the same width as the body textarea, we can make
+   the whole wrapper 95% wide, instead of only the textarea. This will also have to be
+   done on other textareas that has input formats, such as CCK's. */
+.body-field-wrapper {
+  width: 95%;
+}
+.body-field-wrapper textarea,
+.body-field-wrapper .resizable-textarea {
+  width: 100%;
+}
+
+/*
 ** Resizable text areas
 */
 .resizable-textarea {
