Mercurial > defr > drupal > scald > mee
comparison mee.module @ 9:57e611f691eb
Add a wrapper around the filter form
This allows us to add a clear: left; to put it under the rest of the MEE,
which unbreaks the layout.
| author | Franck Deroche <franck@defr.org> |
|---|---|
| date | Wed, 03 Jun 2009 14:53:59 +0200 |
| parents | c3b22723b82f |
| children | 272628486e75 |
comparison
equal
deleted
inserted
replaced
| 8:c3b22723b82f | 9:57e611f691eb |
|---|---|
| 369 if (!empty($field['mee_processing'])) { | 369 if (!empty($field['mee_processing'])) { |
| 370 $filter_key = (count($element['#columns']) == 2) ? $element['#columns'][1] : 'format'; | 370 $filter_key = (count($element['#columns']) == 2) ? $element['#columns'][1] : 'format'; |
| 371 $format = isset($element['#value'][$filter_key]) ? $element['#value'][$filter_key] : FILTER_FORMAT_DEFAULT; | 371 $format = isset($element['#value'][$filter_key]) ? $element['#value'][$filter_key] : FILTER_FORMAT_DEFAULT; |
| 372 $parents = array_merge($element['#parents'] , array($filter_key)); | 372 $parents = array_merge($element['#parents'] , array($filter_key)); |
| 373 $element[$filter_key] = filter_form($format, 1, $parents); | 373 $element[$filter_key] = filter_form($format, 1, $parents); |
| 374 $element[$filter_key]['#prefix'] = '<div class="mee-filter-form">'; | |
| 375 $element[$filter_key]['#suffix'] = '</div>'; | |
| 374 } | 376 } |
| 375 | 377 |
| 376 // Used so that hook_field('validate') knows where to flag an error. | 378 // Used so that hook_field('validate') knows where to flag an error. |
| 377 $element['_error_element'] = array( | 379 $element['_error_element'] = array( |
| 378 '#type' => 'value', | 380 '#type' => 'value', |
