function invite_settings_form in Invite 7.4
Invite module settings form.
Return value
array
1 string reference to 'invite_settings_form'
- invite_menu in ./
invite.module - Implements hook_menu().
File
- includes/
invite.admin.inc, line 310
Code
function invite_settings_form() {
$form = array();
$form['invite_default_expiry_time'] = array(
'#type' => 'select',
'#title' => t('Invitation expiry'),
'#default_value' => variable_get('invite_default_expiry_time', 30),
'#options' => drupal_map_assoc(array(
1,
3,
7,
14,
30,
60,
365,
)),
'#description' => t('Set the expiry period for user invitations, in days.'),
'#multiple' => FALSE,
'#required' => TRUE,
);
$form['invite_registration_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to registration page'),
'#default_value' => variable_get('invite_registration_path', 'user/register'),
'#description' => t('Path to the registration page for invited users. Useful when using the <em>Assign from Path</em> option of <a href="@url" target="blank">Auto Assign Roles</a> module.', array(
'@url' => 'http://drupal.org/project/autoassignrole',
)),
);
$form['invite_require_approval'] = array(
'#type' => 'checkbox',
'#title' => t('Require administrator approval for invitees'),
'#default_value' => variable_get('invite_require_approval', FALSE),
'#description' => t('Accounts that have been created with an invitation will require administrator approval.'),
);
$form['invite_redirect_upon_create'] = array(
'#type' => 'textfield',
'#title' => t('Redirect to path after invite created.'),
'#default_value' => variable_get('invite_redirect_upon_create', '[invite:url]'),
'#description' => t('Optional redirect path after creation of invite. <a></a>'),
);
if (module_exists('token')) {
$form['token_help'] = array(
'#title' => t('Replacement patterns'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['token_help']['help'] = array(
'#markup' => theme('token_tree', array(
'token_types' => array(
'user',
'profile',
'invite',
),
)),
);
}
return system_settings_form($form);
}