function theme_workflow_cleanup_form in Workflow 7
Same name and namespace in other branches
- 7.2 workflow_cleanup/workflow_cleanup.pages.inc \theme_workflow_cleanup_form()
Theme the main form.
File
- workflow_cleanup/
workflow_cleanup.module, line 144 - Cleans up Workflow cruft that may build up over time.
Code
function theme_workflow_cleanup_form($variables) {
$form = $variables['form'];
$output = '';
$header = array(
t('select'),
t('State'),
);
$rows = array();
foreach (element_children($form['no_workflow']) as $sid) {
$rows[] = array(
drupal_render($form['no_workflow'][$sid]['check']),
drupal_render($form['no_workflow'][$sid]['name']),
);
}
$output .= '<h3>' . $form['no_workflow']['#title'] . '</h3>';
$output .= '<div class="description">' . $form['no_workflow']['#description'] . '</div>';
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'style' => 'width: auto;',
),
));
$header[] = t('Workflow');
$rows = array();
foreach (element_children($form['inactive']) as $sid) {
$rows[] = array(
drupal_render($form['inactive'][$sid]['check']),
drupal_render($form['inactive'][$sid]['name']),
drupal_render($form['inactive'][$sid]['wf']),
);
}
$output .= '<h3>' . $form['inactive']['#title'] . '</h3>';
$output .= '<div class="description">' . $form['inactive']['#description'] . '</div>';
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'style' => 'width: auto;',
),
));
$output .= drupal_render_children($form);
return $output;
}