You are here

function bueditor_role_form in BUEditor 6.2

Same name and namespace in other branches
  1. 6 bueditor.admin.inc \bueditor_role_form()
  2. 7 admin/bueditor.admin.inc \bueditor_role_form()

Role-editor form

1 call to bueditor_role_form()
bueditor_admin_form in admin/bueditor.admin.inc
Admin form.

File

admin/bueditor.admin.inc, line 103

Code

function bueditor_role_form($role, $weight = TRUE, $core = TRUE) {
  $form['name'] = array(
    '#type' => 'markup',
    '#value' => check_plain($role['name']),
  );
  if ($weight) {
    $form['weight'] = $core ? array(
      '#type' => 'markup',
      '#value' => $role['weight'],
    ) : array(
      '#type' => 'weight',
      '#default_value' => $role['weight'],
    );
  }
  $form['editor'] = array(
    '#type' => 'select',
    '#options' => bueditor_editor_options(),
    '#default_value' => $role['editor'],
  );
  $form['alt'] = array(
    '#type' => 'select',
    '#options' => bueditor_editor_options(),
    '#default_value' => $role['alt'],
  );
  return $form;
}