function install_configure_form in Drupal 6
Same name and namespace in other branches
- 7 includes/install.core.inc \install_configure_form()
Form API array definition for site configuration.
1 string reference to 'install_configure_form'
- install_tasks in ./
install.php - Tasks performed after the database is initialized.
File
- ./
install.php, line 1027
Code
function install_configure_form(&$form_state, $url) {
$form['intro'] = array(
'#value' => st('To configure your website, please provide the following information.'),
'#weight' => -10,
);
$form['site_information'] = array(
'#type' => 'fieldset',
'#title' => st('Site information'),
'#collapsible' => FALSE,
);
$form['site_information']['site_name'] = array(
'#type' => 'textfield',
'#title' => st('Site name'),
'#required' => TRUE,
'#weight' => -20,
);
$form['site_information']['site_mail'] = array(
'#type' => 'textfield',
'#title' => st('Site e-mail address'),
'#default_value' => ini_get('sendmail_from'),
'#description' => st("The <em>From</em> address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)"),
'#required' => TRUE,
'#weight' => -15,
);
$form['admin_account'] = array(
'#type' => 'fieldset',
'#title' => st('Administrator account'),
'#collapsible' => FALSE,
);
$form['admin_account']['account']['#tree'] = TRUE;
$form['admin_account']['markup'] = array(
'#value' => '<p class="description">' . st('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.') . '</p>',
'#weight' => -10,
);
$form['admin_account']['account']['name'] = array(
'#type' => 'textfield',
'#title' => st('Username'),
'#maxlength' => USERNAME_MAX_LENGTH,
'#description' => st('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
'#required' => TRUE,
'#weight' => -10,
);
$form['admin_account']['account']['mail'] = array(
'#type' => 'textfield',
'#title' => st('E-mail address'),
'#maxlength' => EMAIL_MAX_LENGTH,
'#description' => st('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,
'#weight' => -5,
);
$form['admin_account']['account']['pass'] = array(
'#type' => 'password_confirm',
'#required' => TRUE,
'#size' => 25,
'#weight' => 0,
);
$form['server_settings'] = array(
'#type' => 'fieldset',
'#title' => st('Server settings'),
'#collapsible' => FALSE,
);
$form['server_settings']['date_default_timezone'] = array(
'#type' => 'select',
'#title' => st('Default time zone'),
'#default_value' => 0,
'#options' => _system_zonelist(),
'#description' => st('By default, dates in this site will be displayed in the chosen time zone.'),
'#weight' => 5,
);
$form['server_settings']['clean_url'] = array(
'#type' => 'radios',
'#title' => st('Clean URLs'),
'#default_value' => 0,
'#options' => array(
0 => st('Disabled'),
1 => st('Enabled'),
),
'#description' => st('This option makes Drupal emit "clean" URLs (i.e. without <code>?q=</code> in the URL).'),
'#disabled' => TRUE,
'#prefix' => '<div id="clean-url" class="install">',
'#suffix' => '</div>',
'#weight' => 10,
);
$form['server_settings']['update_status_module'] = array(
'#type' => 'checkboxes',
'#title' => st('Update notifications'),
'#options' => array(
1 => st('Check for updates automatically'),
),
'#default_value' => array(
1,
),
'#description' => st('With this option enabled, Drupal will notify you when new releases are available. This will significantly enhance your site\'s security and is <strong>highly recommended</strong>. This requires your site to periodically send anonymous information on its installed components to <a href="@drupal">drupal.org</a>. For more information please see the <a href="@update">update notification information</a>.', array(
'@drupal' => 'http://drupal.org',
'@update' => 'http://drupal.org/handbook/modules/update',
)),
'#weight' => 15,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => st('Save and continue'),
'#weight' => 15,
);
$form['#action'] = $url;
$form['#redirect'] = FALSE;
// Allow the profile to alter this form. $form_state isn't available
// here, but to conform to the hook_form_alter() signature, we pass
// an empty array.
$hook_form_alter = $_GET['profile'] . '_form_alter';
if (function_exists($hook_form_alter)) {
$hook_form_alter($form, array(), 'install_configure');
}
return $form;
}