You are here

function select_registration_roles_admin_settings_form in Select registration roles 7

Allow admin to set which roles will be available on registration form.

Set roles need admin approval.

1 string reference to 'select_registration_roles_admin_settings_form'
select_registration_roles_menu in ./select_registration_roles.module
Implements hook_menu().

File

./select_registration_roles.module, line 40
Admin can select roles that will be display on registration form.

Code

function select_registration_roles_admin_settings_form($form, &$form_state) {
  $roles = select_registration_roles_get_all_roles();
  $default_value = array();
  $form['select_registration_roles_setby_admin'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Roles'),
    '#options' => $roles,
    '#description' => t("Select roles that will be displayed on registration form"),
    '#default_value' => variable_get('select_registration_roles_setby_admin', $default_value),
  );
  $form['select_registration_roles_admin_approval'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Approval Roles'),
    '#options' => $roles,
    '#description' => t("Select roles that need admin approval"),
    '#default_value' => variable_get('select_registration_roles_admin_approval', $default_value),
  );
  return system_settings_form($form);
}