function hosting_client_form_alter in Hostmaster (Aegir) 6
Implementation of hook_form_alter().
File
- modules/
hosting/ client/ hosting_client.module, line 835
Code
function hosting_client_form_alter(&$form, $form_state, $form_id) {
if (user_access('administer clients')) {
if (hosting_feature('client') && $form_id == 'platform_node_form') {
global $user;
$node = $form["#node"];
// Show a list of clients to give access to this platform
$clients = _hosting_get_clients();
$form['clients'] = array(
'#type' => 'checkboxes',
'#title' => t('Platform access control'),
'#options' => $clients,
'#default_value' => isset($node->clients) ? $node->clients : array(),
'#description' => t('Grant access to this platform for relevant clients where required. Leave all checkboxes unchecked to grant all clients access to this platform.'),
);
}
}
}