You are here

function theme_bueditor_form_admin in BUEditor 5

Admin form themed.

File

./bueditor.module, line 93

Code

function theme_bueditor_form_admin($form) {
  $header = array(
    t('User role'),
    t('Weight'),
    t('Assigned editor'),
  );
  $rows = isset($form['user1editor']) ? array(
    array(
      t('user #1'),
      '---',
      drupal_render($form['user1editor']),
    ),
  ) : array();
  foreach (bueditor_sorted_roles() as $rid => $role) {
    $rows[] = array(
      drupal_render($form['roles'][$rid]['name']),
      drupal_render($form['roles'][$rid]['weight']),
      drupal_render($form['roles'][$rid]['editor']),
    );
  }
  $output = '<h2 class="title">' . t('User access settings') . '</h2>';
  $output .= theme('table', $header, $rows);
  $output .= '<div class="form-item"><div class="description">' . t('Assign editors to user roles. For users who have <strong>multiple roles</strong>, <strong>weight</strong> property will determine the assigned editor. Lighter roles that are placed upper will take the precedence. So, an administrator role should be placed over other roles by having a smaller weight, ie. -10.') . '</div></div>';
  $output .= drupal_render($form);
  return $output;
}