Same name and namespace in other branches
- 4.7.x modules/filter.module \theme_filter_admin_order()
- 5.x modules/filter/filter.module \theme_filter_admin_order()
Theme filter order configuration form.
Related topics
File
- modules/
filter/ filter.admin.inc, line 360 - Admin page callbacks for the filter module.
Code
function theme_filter_admin_order($form) {
$header = array(
t('Name'),
t('Weight'),
);
$rows = array();
foreach (element_children($form['names']) as $id) {
// Don't take form control structures.
if (is_array($form['names'][$id])) {
$form['weights'][$id]['#attributes']['class'] = 'filter-order-weight';
$rows[] = array(
'data' => array(
drupal_render($form['names'][$id]),
drupal_render($form['weights'][$id]),
),
'class' => 'draggable',
);
}
}
$output = theme('table', $header, $rows, array(
'id' => 'filter-order',
));
$output .= drupal_render($form);
drupal_add_tabledrag('filter-order', 'order', 'sibling', 'filter-order-weight', NULL, NULL, FALSE);
return $output;
}