Commit 1c220b88 authored by drumm's avatar drumm Committed by Neil Drumm

Service-specific config was missing.

parent 935b9573
......@@ -195,19 +195,20 @@ function hosting_server_form(&$node) {
'#options' => array_merge(array('null' => 'None'), drupal_map_assoc(array_keys($service['types']))),
'#default_value' => isset($node->services[$name]->available) && $node->services[$name]->available ? $node->services[$name]->type : 'null',
);
}
foreach ($service['types'] as $type => $class) {
$form['services'][$name][$type] = array(
'#prefix' => '<div id="provision-service-settings-' . $name . '-' . $type . '" class="provision-service-settings-' . $name . '">',
'#suffix' => '</div>',
);
if (isset($node->services[$name]) && $node->services[$name]->type === $type) {
$node->services[$name]->form($form['services'][$name][$type]);
}
else {
$service_object = hosting_services_new_object($name, $type, $node);
$service_object->form($form['services'][$name][$type]);
// Service-specific configuration.
foreach ($service['types'] as $type => $class) {
$form['services'][$name][$type] = array(
'#prefix' => '<div id="provision-service-settings-' . $name . '-' . $type . '" class="provision-service-settings-' . $name . '">',
'#suffix' => '</div>',
);
if (isset($node->services[$name]) && $node->services[$name]->type === $type) {
$node->services[$name]->form($form['services'][$name][$type]);
}
else {
$service_object = hosting_services_new_object($name, $type, $node);
$service_object->form($form['services'][$name][$type]);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment