function theme_role_delegation_delegate_roles_action_form in Role Delegation 7
File
- ./
role_delegation.module, line 361 - This module allows site administrators to grant some roles the authority to change roles assigned to users, without them needing the 'administer access control' permission.
Code
function theme_role_delegation_delegate_roles_action_form($variables) {
$form = $variables['form'];
$rows = array();
$header = array(
t('Role'),
t('Operation'),
);
foreach (element_children($form['role_change']) as $key) {
$role = $form['role_change'][$key]['#title'];
unset($form['role_change'][$key]['#title']);
$operation = drupal_render($form['role_change'][$key]);
$row = array(
array(
'data' => $role,
),
array(
'data' => $operation,
),
);
$rows[] = $row;
}
$output = drupal_render($form['actions_label']);
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'role-delegation-table',
),
));
$output .= drupal_render_children($form);
return $output;
}