Openstack theme - remove content selector from search block

Remove the Site/Users dropdown from search block that appears as part
of every public page. Groups common module created to hold global
callbacks.

Change-Id: I10586ee1e8d356cd0883a609ee7fdc2c27514ce8
This commit is contained in:
Marton Kiss 2013-11-01 08:40:55 +01:00
parent c9c2b02644
commit 03f68fbd8a
4 changed files with 27 additions and 0 deletions

View File

@ -116,3 +116,4 @@ dependencies[] = groups_language_switcher
dependencies[] = groups_directory
dependencies[] = groups_footer
dependencies[] = groups_homepage
dependencies[] = groups_common

View File

@ -0,0 +1,6 @@
name = Groups Common
description = Common hooks and settings for Groups project
core = 7.x
package = Groups - Common
version = 7.x-1.0
project = groups_common

View File

@ -0,0 +1,10 @@
<?php
function groups_common_enable() {
// need to raise weight to override custom_search module settings
db_update('system')
->fields(array('weight' => 110))
->condition('type', 'module')
->condition('name', 'groups_common')
->execute();
}

View File

@ -0,0 +1,10 @@
<?php
function groups_common_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'search_block_form') {
// remove content selector from search block
$form['custom_search_types']['#type'] = 'hidden';
$form['custom_search_types']['#default_value'] = 'o-search_facetapi';
}
}