You are here

function imce_role_form in IMCE 6

Same name and namespace in other branches
  1. 6.2 inc/imce.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/admin.inc
Admin form.

File

inc/admin.inc, line 450

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;
}