You are here

function hosting_client_configure in Hosting 7.3

Same name and namespace in other branches
  1. 5 client/hosting_client.module \hosting_client_configure()
  2. 6.2 client/hosting_client.module \hosting_client_configure()
  3. 7.4 client/hosting_client.module \hosting_client_configure()

Menu callback for the module's settings.

See also

hosting_client_menu()

1 string reference to 'hosting_client_configure'
hosting_client_menu in client/hosting_client.module
Implements hook_menu().

File

client/hosting_client.module, line 1006

Code

function hosting_client_configure($form, &$form_state) {
  $form['hosting_client_prefix'] = array(
    '#type' => 'textfield',
    '#title' => t('Client internal name prefix'),
    '#description' => t('Client nodes have an internal name that can be mapped to a UNIX group. This is the prefix assigned to that internal name to make sure it is in a separate namespace. Note that UNIX groups are generally limited to 16 characters so this prefix should be kept short. It can also be empty, in which case no prefix will be added.'),
    '#default_value' => variable_get('hosting_client_prefix', ''),
    '#size' => 5,
    '#maxlength' => 16,
  );
  $form['hosting_client_register_user'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically create user accounts for new clients.'),
    '#description' => t('If this setting is on, any new client nodes will automatically have a system user account generated for them, and associated with the new client node. Users going through the signup form module have a user created regardless of this setting.'),
    '#default_value' => variable_get('hosting_client_register_user', FALSE),
  );
  $form['hosting_client_require_client_to_create_site'] = array(
    '#type' => 'checkbox',
    '#title' => t('Require users to have a client to create a site.'),
    '#description' => t('If this setting is on, users will not be able to create sites unless they are associated with a client.'),
    '#default_value' => variable_get('hosting_client_require_client_to_create_site', FALSE),
  );

  // User e-mail settings.
  $form['email'] = array(
    '#type' => 'fieldset',
    '#title' => t('User e-mail settings'),
  );
  $form['email']['hosting_client_send_welcome'] = array(
    '#type' => 'checkbox',
    '#title' => t('Send welcome mail to new clients.'),
    '#description' => t('If this setting is on, new clients will receive a welcome email containing their login details.'),
    '#default_value' => variable_get('hosting_client_send_welcome', FALSE),
  );
  $form['email']['hosting_client_mail_welcome_subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Subject of welcome e-mail'),
    '#default_value' => _hosting_client_mail_text('welcome_subject'),
    '#maxlength' => 180,
    '#description' => t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') . ' ' . t('Available variables are:') . ' !username, !site, !password, !uri, !uri_brief, !date, !login_uri, !edit_uri, !login_url.',
  );
  $form['email']['hosting_client_mail_welcome_body'] = array(
    '#type' => 'textarea',
    '#title' => t('Body of welcome e-mail'),
    '#default_value' => _hosting_client_mail_text('welcome_body'),
    '#rows' => 15,
    '#description' => t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') . ' ' . t('Available variables are:') . ' !username, !site, !password, !uri, !uri_brief, !login_uri, !edit_uri, !login_url.',
  );
  return system_settings_form($form);
}