You are here

function regcode_og_admin in Registration codes 6

Same name and namespace in other branches
  1. 6.2 regcode_og/regcode_og.module \regcode_og_admin()

Admin page for role assignment

1 string reference to 'regcode_og_admin'
regcode_og_menu in regcode_og/regcode_og.module
Implementation of hook_menu()

File

regcode_og/regcode_og.module, line 71

Code

function regcode_og_admin() {
  $form = array();
  $form['regcode_og']['new'] = array(
    '#type' => 'fieldset',
    '#title' => t('Create a new rule'),
  );
  $form['regcode_og']['new']['role'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Assign organic group(s)'),
    '#options' => og_all_groups_options(),
  );
  $form['regcode_og']['new']['category'] = array(
    '#type' => 'select',
    '#title' => t('When a user uses a regcode in category'),
    '#options' => regcode_get_categories(),
  );
  $form['regcode_og']['new']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Create rule'),
  );
  $form['regcode_og']['list'] = array(
    '#type' => 'markup',
    '#value' => regcode_og_get_list_markup(),
  );
  return $form;
}