You are here

function imce_role_form in IMCE 6.2

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

Role-profile form

1 call to imce_role_form()
imce_admin_form in inc/imce.admin.inc
Admin form.

File

inc/imce.admin.inc, line 493
Serves administration pages of IMCE.

Code

function imce_role_form($role, $weight = TRUE, $core = TRUE) {
  $form['name'] = array(
    '#type' => 'markup',
    '#value' => $role['name'],
  );
  if ($weight) {
    $form['weight'] = $core ? array(
      '#type' => 'textfield',
      '#value' => $role['weight'],
      '#attributes' => array(
        'readonly' => 'readonly',
        'style' => 'border: none; width: 2em; background-color: transparent;',
      ),
    ) : array(
      '#type' => 'weight',
      '#default_value' => $role['weight'],
    );
  }
  $form['pid'] = array(
    '#type' => 'select',
    '#options' => imce_profile_options(),
    '#default_value' => $role['pid'],
  );
  return $form;
}