You are here

function _user_import_edit_settings_fields in User Import 6.2

Same name and namespace in other branches
  1. 8 supported/user_import.inc \_user_import_edit_settings_fields()
  2. 5.2 supported/user_import.inc \_user_import_edit_settings_fields()
  3. 5 supported/user_import.inc \_user_import_edit_settings_fields()
  4. 6.4 supported/user_import.inc \_user_import_edit_settings_fields()
  5. 7.3 supported/user_import.inc \_user_import_edit_settings_fields()
  6. 7 supported/user_import.inc \_user_import_edit_settings_fields()
  7. 7.2 supported/user_import.inc \_user_import_edit_settings_fields()
1 call to _user_import_edit_settings_fields()
user_import_user_import_form_fieldset in supported/user_import.inc
Implementation of hook_user_import_form_fieldsets(). Add fieldsets to an import settings form.

File

supported/user_import.inc, line 121

Code

function _user_import_edit_settings_fields(&$form, $import, $collapsed) {
  $form['optional'] = array(
    '#type' => 'fieldset',
    '#title' => t('Options'),
    '#weight' => -85,
    '#collapsible' => TRUE,
    '#collapsed' => $collapsed,
  );
  $form['optional']['first_line_skip'] = array(
    '#type' => 'checkbox',
    '#title' => t('Ignore First Line'),
    '#default_value' => isset($import['first_line_skip']) ? $import['first_line_skip'] : 0,
    '#description' => t('If the first line is the names of the data columns, set to ignore first line.'),
  );

  /**
   * @todo move contact options to a separate contact.inc support file
   */
  $form['optional']['contact'] = array(
    '#type' => 'checkbox',
    '#title' => t('Contact'),
    '#default_value' => isset($import['contact']) ? $import['contact'] : 0,
    '#description' => t("Set each user's personal contact form to 'allowed'."),
  );
  $form['optional']['send_email'] = array(
    '#type' => 'checkbox',
    '#title' => t('Send Email'),
    '#default_value' => isset($import['send_email']) ? $import['send_email'] : 0,
    '#description' => t('Send email to users when their account is created.'),
  );
  $form['optional']['username_space'] = array(
    '#type' => 'checkbox',
    '#title' => t('Username Space'),
    '#default_value' => isset($import['username_space']) ? $import['username_space'] : 0,
    '#description' => t("Include spaces in usernames, e.g. 'John' + 'Smith' => 'John Smith'."),
  );
  $form['optional']['activate'] = array(
    '#type' => 'checkbox',
    '#title' => t('Activate Accounts'),
    '#default_value' => isset($import['activate']) ? $import['activate'] : 0,
    '#description' => t("User accounts will not be visible to other users until their owner logs in. Select this option to make all imported user accounts visible. <strong>Note - one time login links in welcome emails will no longer work if this option is enabled.</strong>"),
  );
  $form['optional']['delimiter'] = array(
    '#type' => 'textfield',
    '#title' => t('File Delimiter'),
    '#size' => 4,
    '#default_value' => isset($import['delimiter']) ? $import['delimiter'] : ',',
    '#description' => t("The column delimiter for the file. Use '/t' for Tab."),
  );
  return;
}