You are here

function bueditor_role_form in BUEditor 7

Same name and namespace in other branches
  1. 6.2 admin/bueditor.admin.inc \bueditor_role_form()
  2. 6 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 132

Code

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