/**
* Implementation of hook_form()
* TODO: title=hostname ip= file=tar.bz2 description=body disk size=(permissioned) memory size=(permissioned) swap size=(permissioned)
*/
function xen_node_form(&$node, &$param) {
// $type = node_get_types('type', $node);
$xen_node = $node->xen_node;
'#type' => 'textfield',
'#title' => check_plain$type->title_label,
'#description' =>
t('Choose an unique hostname for this host. The hostname can contain alphabetical characters or numbers.'),
'#size' => 50,
'#maxlength' => 100,
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5,
);
$form['body_filter']['body'] =
array(
'#type' => 'textarea',
'#title' => $type->body_label,
'#required' => FALSE,
'#default_value' => $node->body,
'#rows' => 7,
);
// $form['xen_node_options'] = array(
// '#title' => t('Xen Node Options'),
// '#type' => 'fieldset',
// '#description' => t('Options for the Xen node type.'),
// '#collapsible' => TRUE,
// '#collapsed' => FALSE,
// '#weight' => 1,
// );
'#type' => 'textfield',
'#title' =>
t('Disk size'),
'#field_suffix' =>
t('GB'),
'#size' => 1,
'#maxlength' => 3,
// '#value' => intval(variable_get('xen_fs_size', '6')),
// '#disabled' => TRUE,
'#description' =>
t('Disk size. You can alter this only if you have sufficient privileges.'),
'#required' => TRUE,
);
'#type' => 'textfield',
'#title' =>
t('Memory size'),
'#field_suffix' =>
t('MB'),
'#size' => 2,
'#maxlength' => 4,
// '#value' => intval(variable_get('xen_mem_size', '128')),
// '#disabled' => TRUE,
'#description' =>
t('RAM size. You can alter this only if you have sufficient privileges.'),
'#required' => TRUE,
);
'#type' => 'textfield',
'#title' =>
t('Swap size'),
'#field_suffix' =>
t('MB'),
'#size' => 2,
'#maxlength' => 4,
// '#value' => intval(variable_get('xen_swap_size', '1024')),
// '#disabled' => TRUE,
'#description' =>
t('Swap size. You can alter this only if you have sufficient privileges.'),
'#required' => TRUE,
);
return $form;
}