You are here

function hosting_wizard_provision_web in Hosting 5

Configures web_server_node_form minus almost all the forms.

@todo pull changes in the form upstream

File

./hosting.wizard.inc, line 282

Code

function hosting_wizard_provision_web() {
  $form = drupal_retrieve_form('web_server_node_form', node_load(HOSTING_OWN_WEB_SERVER));
  _hosting_wizard_cleanse_node_form($form);
  $own_link = _hosting_node_link(HOSTING_OWN_WEB_SERVER);
  $form['title']['#type'] = 'value';
  $form['ip_address']['#type'] = 'value';
  $form['backup_path']['#type'] = 'value';
  $form['config_path']['#type'] = 'value';
  $form['drush_path']['#type'] = 'value';
  $form['drush_path']['#required'] = FALSE;
  $form['user_help'] = array(
    '#type' => 'requirement_help',
    '#requirement' => 'user',
    '#weight' => 0,
    '#summary' => HOSTING_HELP_ENABLED,
    '#configuration' => HOSTING_HELP_COLLAPSED,
  );
  $form['script_user']['#weight'] = 1;
  $form['group_help'] = array(
    '#type' => 'requirement_help',
    '#requirement' => 'group',
    '#weight' => 10,
    '#summary' => HOSTING_HELP_ENABLED,
    '#configuration' => HOSTING_HELP_COLLAPSED,
  );
  $form['web_group']['#weight'] = 11;
  $form['restart_cmd_help'] = array(
    '#type' => 'requirement_help',
    '#requirement' => 'visudo',
    '#weight' => 19,
    '#summary' => HOSTING_HELP_ENABLED,
    '#configuration' => HOSTING_HELP_COLLAPSED,
  );
  $form['restart_cmd']['#weight'] = 20;

  // remove all the things i don't want from the node form.
  return hosting_wizard_form('provision/web', $form);
}