You are here

function drupal_commons_theme_form in Drupal Commons 6.2

Provide a form to choose the default theme

1 call to drupal_commons_theme_form()
_drupal_commons_drush_tasks in includes/drush.inc
Automated run through the option forms since drush can't handle the forms
1 string reference to 'drupal_commons_theme_form'
drupal_commons_profile_tasks in ./drupal_commons.profile
Perform any final installation tasks for this profile.

File

includes/form.inc, line 217
Contains form-related functions for the installation profile

Code

function drupal_commons_theme_form(&$form_state, $url) {
  $form = array();
  drupal_set_title(st('Choose your default theme'));

  // Help message
  $form['message'] = array(
    '#type' => 'item',
    '#value' => st('Choose the initial theme for your site. At any time after the installation, the theme can be changed.'),
  );

  // Theme selector
  $form['theme'] = array(
    '#type' => 'radios',
    '#options' => array(
      'commons_origins' => _drupal_commons_theme_option('commons_origins', st('Commons Origins')),
      'commons_connect' => _drupal_commons_theme_option('commons_connect', st('Commons Connect')),
      'commons_environs' => _drupal_commons_theme_option('commons_environs', st('Commons Environs')),
    ),
    '#default_value' => DRUPAL_COMMONS_DEFAULT_THEME,
  );

  // Submit button
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => st('Continue'),
  );

  // Store the installation url for redirection post-submit
  $form['url'] = array(
    '#type' => 'value',
    '#value' => $url,
  );
  return $form;
}