function theme_colors_admin_settings in Colors 7
Returns HTML for the settings form.
Parameters
array $variables: An associative array containing:
- form: A render element representing the form.
File
- includes/
colors.admin.inc, line 110 - Color page callbacks for the Colors module.
Code
function theme_colors_admin_settings($variables) {
$form = $variables['form'];
$rows = array();
foreach (element_children($form['modules']) as $module) {
$row = array();
$row[] = $form['modules'][$module]['#name'];
$row[] = drupal_render($form['modules'][$module]['weight']);
$rows[] = array(
'data' => $row,
'class' => array(
'draggable',
),
);
}
$form['order_settings']['table'] = array(
'#theme' => 'table',
'#header' => array(
t('Module'),
t('Weight'),
),
'#rows' => $rows,
'#attributes' => array(
'id' => 'colors-settings',
),
);
drupal_add_tabledrag('colors-settings', 'order', 'sibling', 'colors-weight');
return drupal_render_children($form);
}