You are here

function hostmaster_task_webserver in Hostmaster (Aegir) 5.x

Configures web_server_node_form minus almost all the forms.

File

./hostmaster.forms.inc, line 26

Code

function hostmaster_task_webserver() {
  drupal_set_title(st("Configure your web server"));
  $form = node_form($form_state, node_load(HOSTING_OWN_WEB_SERVER));
  _hostmaster_clean_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'] = hostmaster_requirement_help('user', array(
    '#weight' => 0,
    '#summary' => HOSTING_HELP_ENABLED,
    '#configuration' => HOSTING_HELP_COLLAPSED,
  ));
  $form['script_user']['#weight'] = 1;
  $form['group_help'] = hostmaster_requirement_help('group', array(
    '#weight' => 10,
    '#summary' => HOSTING_HELP_ENABLED,
    '#configuration' => HOSTING_HELP_COLLAPSED,
  ));
  $form['web_group']['#weight'] = 11;
  $form['restart_cmd_help'] = hostmaster_requirement_help('visudo', array(
    '#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 hostmaster_form($form);
}