You are here

function _hostmaster_clean_node_form in Hostmaster (Aegir) 5.x

Take a node form and get rid of all the crud that we don't need on a wizard form, in a non destructive manner.

3 calls to _hostmaster_clean_node_form()
hostmaster_task_dbserver in ./hostmaster.forms.inc
Database configuration form
hostmaster_task_filesystem in ./hostmaster.forms.inc
Configures web_server_node_form paths.
hostmaster_task_webserver in ./hostmaster.forms.inc
Configures web_server_node_form minus almost all the forms.

File

./hostmaster.profile, line 374

Code

function _hostmaster_clean_node_form(&$form) {
  $form['revision_information']['revision']['#type'] = 'value';
  $form['revision_information']['log']['#type'] = 'value';
  $form['revision_information']['#type'] = 'markup';
  $form['author']['name']['#type'] = 'value';
  $form['author']['date']['#type'] = 'value';
  $form['author']['#type'] = 'markup';
  $form['options']['sticky']['#type'] = 'value';
  $form['options']['status']['#type'] = 'value';
  $form['options']['promote']['#type'] = 'value';
  $form['options']['#type'] = 'markup';
  unset($form['buttons']);
}