1 install.core.inc | _install_configure_form($form, &$form_state, &$install_state) |
Form constructor for a site configuration form.
Parameters
array $install_state: An array of information about the current installation state.
See also
install_configure_form_validate()
install_configure_form_submit()
Related topics
File
- core/
includes/ install.core.inc, line 2217 - API functions for installing Backdrop.
Code
function _install_configure_form($form, &$form_state, &$install_state) {
include_once BACKDROP_ROOT . '/core/includes/locale.inc';
$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['admin_account'] = array(
'#type' => 'fieldset',
'#title' => st('Primary user account'),
'#collapsible' => FALSE,
);
$form['admin_account']['account']['#tree'] = TRUE;
$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, pluses, hyphens, and underscores.'),
'#required' => TRUE,
'#weight' => -10,
'#attributes' => array('class' => array('username')),
);
$form['admin_account']['account']['mail'] = array(
'#type' => 'email',
'#title' => st('Email address'),
'#required' => TRUE,
'#weight' => -5,
);
$form['admin_account']['account']['pass'] = array(
'#title' => st('Password'),
'#type' => 'password',
'#required' => TRUE,
'#weight' => 0,
'#password_toggle' => TRUE,
'#password_strength' => TRUE,
);
$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' => date_default_timezone_get(),
'#options' => system_time_zones(),
'#description' => st('By default, dates in this site will be displayed in the chosen time zone.'),
'#weight' => 5,
'#attributes' => array('class' => array('timezone-detect')),
);
$form['server_settings']['clean_url'] = array(
'#type' => 'hidden',
'#default_value' => 0,
'#attributes' => array('id' => 'edit-clean-url', 'class' => array('install')),
);
$form['update_notifications'] = array(
'#type' => 'fieldset',
'#title' => st('Update notifications'),
'#collapsible' => FALSE,
);
$form['update_notifications']['update_status_module'] = array(
'#type' => 'checkboxes',
'#options' => array(
1 => st('Check for updates automatically'),
2 => st('Receive email notifications'),
),
'#default_value' => array(1, 2),
'#description' => st('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to <a href="https://backdropcms.org">BackdropCMS.org</a>.'),
'#weight' => 15,
);
$form['update_notifications']['update_status_module'][2] = array(
'#states' => array(
'visible' => array(
'input[name="update_status_module[1]"]' => array('checked' => TRUE),
),
),
);
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => st('Save and continue'),
'#weight' => 15,
);
return $form;
}