function oa_users_external_user_form in Open Atrium Core 7.2
1 string reference to 'oa_users_external_user_form'
- oa_users_register_external_user_modal in modules/
oa_users/ plugins/ content_types/ oa_users_add_external_user.inc - This is the page callback for "oa_users/add/%ctools_js/%node".
File
- modules/
oa_users/ plugins/ content_types/ oa_users_add_external_user.inc, line 126
Code
function oa_users_external_user_form($form, &$form_state) {
$form['#user'] = drupal_anonymous_user();
$form['#user_category'] = 'register';
$form['#group'] = $form_state['#group'];
$form['#validate'][] = 'user_account_form_validate';
$form['#submit'][] = 'oa_users_pre_user_register_submit';
$form['#submit'][] = 'user_register_submit';
$form['#submit'][] = 'oa_users_external_user_form_submit';
// Account information.
$form['account'] = array(
'#type' => 'container',
'#weight' => -10,
);
$form['account']['name'] = array(
'#type' => 'textfield',
'#title' => t('Username'),
'#maxlength' => USERNAME_MAX_LENGTH,
'#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
'#required' => TRUE,
'#attributes' => array(
'class' => array(
'username',
),
),
'#default_value' => '',
'#weight' => -10,
);
$form['account']['mail'] = array(
'#type' => 'textfield',
'#title' => t('E-mail address'),
'#maxlength' => EMAIL_MAX_LENGTH,
'#description' => t('A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),
'#required' => TRUE,
'#default_value' => '',
);
// The personal welcome message will be added to the top of the mail.
// * updated by ajax call back (we shouldn't show tokens to users)
// * or in a second step of the form
// Both approaches have ramifications for the use of the form in ajaxy popups.
$form['welcome_message_body'] = array(
'#type' => 'textarea',
'#title' => t('Personal welcome message'),
'#default_value' => '',
'#description' => t('This welcome message will appear at the top of the e-mail notification sent to the new user.'),
// TODO: Implement this field in the future and then set access back to TRUE
'#access' => FALSE,
);
$form['account']['status'] = array(
'#type' => 'radios',
'#title' => t('Status'),
'#default_value' => 1,
'#options' => array(
t('Blocked'),
t('Active'),
),
'#access' => FALSE,
);
$form['account']['notify'] = array(
'#type' => 'checkbox',
'#title' => t('Notify user of new account'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Add'),
'#weight' => 20,
);
return $form;
}