Commit 7bdd8b37 authored by Dries's avatar Dries
Browse files

- Patch #39605 by Alex: remove form_filter type.

parent 272c6b95
......@@ -762,7 +762,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) {
$form['format'] = array('#type' => 'fieldset', '#title' => t('Input format'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -16);
// Multiple formats available: display radio buttons with tips.
foreach ($formats as $format) {
$form['format'][$format->format] = array('#type' => 'filter_format', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#validate' => 'filter_form_validate');
$form['format'][$format->format] = array('#type' => 'radio', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#validate' => 'filter_form_validate');
}
return $form;
}
......@@ -776,19 +776,6 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) {
}
}
function filter_elements() {
$type['filter_format'] = array('#input' => TRUE);
return $type;
}
function theme_filter_format($element) {
$output .= '<div>';
$output .= '<label class="option"><input type="radio" class="form-radio" name="' . $element['#name'] . '" value="'. $element['#return_value'] .'"'. (($element['#default_value'] == $element['#return_value']) ? ' checked="checked"' : '') .' /> '. $element['#title'] .'</label>';
$output .= $element['#description'];
$output .= '</div>';
return $output;
}
function filter_form_validate($element) {
static $validated;
if ($validated) {
......
......@@ -762,7 +762,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) {
$form['format'] = array('#type' => 'fieldset', '#title' => t('Input format'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -16);
// Multiple formats available: display radio buttons with tips.
foreach ($formats as $format) {
$form['format'][$format->format] = array('#type' => 'filter_format', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#validate' => 'filter_form_validate');
$form['format'][$format->format] = array('#type' => 'radio', '#title' => $format->name, '#default_value' => $value, '#return_value' => $format->format, '#parents' => array('format'), '#description' => theme('filter_tips', _filter_tips($format->format, false)), '#validate' => 'filter_form_validate');
}
return $form;
}
......@@ -776,19 +776,6 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) {
}
}
function filter_elements() {
$type['filter_format'] = array('#input' => TRUE);
return $type;
}
function theme_filter_format($element) {
$output .= '<div>';
$output .= '<label class="option"><input type="radio" class="form-radio" name="' . $element['#name'] . '" value="'. $element['#return_value'] .'"'. (($element['#default_value'] == $element['#return_value']) ? ' checked="checked"' : '') .' /> '. $element['#title'] .'</label>';
$output .= $element['#description'];
$output .= '</div>';
return $output;
}
function filter_form_validate($element) {
static $validated;
if ($validated) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment