function google_appliance_form_alter in Google Search Appliance 6.2
Same name and namespace in other branches
- 5 google_appliance.module \google_appliance_form_alter()
Implementation of hook_form_alter().
File
- ./
google_appliance.module, line 1364 - Google Search Appliance (GSA) / Google Mini integration
Code
function google_appliance_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'block_admin_configure') {
$module = $form['module']['#value'];
$delta = $form['delta']['#value'];
$var_name = $module . '-' . $delta;
$ga_blocksettings = variable_get('google_appliance_block_settings', array());
$google_appliance_name = variable_get('google_appliance_name', GOOGLE_APPLIANCE_NAME_DEFAULT);
$form['block_settings']['google_appliance'] = array(
'#type' => 'fieldset',
'#title' => t("@name Settings", array(
'@name' => $google_appliance_name,
)),
'#description' => t(''),
'#collapsed' => TRUE,
'#collapsible' => TRUE,
'#tree' => TRUE,
'#weight' => -1,
);
$form['block_settings']['google_appliance']['hide'] = array(
'#type' => 'radios',
'#title' => t("Do you want to hide this block from the GSA crawler?"),
'#description' => t('Select No if you want this block content to be crawled with the page content.'),
'#options' => array(
1 => t('Yes'),
0 => t('No'),
),
'#default_value' => isset($ga_blocksettings[$var_name]) ? $ga_blocksettings[$var_name] : 1,
'#collapsed' => TRUE,
'#collapsible' => TRUE,
'#tree' => TRUE,
);
$form['#submit'][] = 'google_appliance_block_save';
return $form;
}
}