function hosting_site_form_alter in Hosting 6.2
Same name and namespace in other branches
- 5 site/hosting_site.module \hosting_site_form_alter()
- 7.4 site/hosting_site.form.inc \hosting_site_form_alter()
- 7.3 site/hosting_site.form.inc \hosting_site_form_alter()
Implements of hook_form_alter().
Hide the delete button on site nodes
File
- site/
hosting_site.form.inc, line 363 - Site node form.
Code
function hosting_site_form_alter(&$form, &$form_state, $form_id) {
// Remove delete button from site edit form, unless the site's already been deleted via the Delete task
if ($form_id == 'site_node_form') {
$node = $form['#node'];
if ($node->site_status !== '-2') {
$form['buttons']['delete']['#type'] = 'hidden';
}
}
// Override the 'Bulk operations' title.
if (in_array($form_id, array(
'views_bulk_operations_form_hosting_site_list_block_client',
'views_bulk_operations_form_hosting_site_list_page_1',
'views_bulk_operations_form_hosting_site_list_block_1',
'views_bulk_operations_form_hosting_site_list_block_profile',
))) {
$form['select']['#title'] = 'Site operations';
}
}