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:
parent
c9c2b02644
commit
03f68fbd8a
@ -116,3 +116,4 @@ dependencies[] = groups_language_switcher
|
||||
dependencies[] = groups_directory
|
||||
dependencies[] = groups_footer
|
||||
dependencies[] = groups_homepage
|
||||
dependencies[] = groups_common
|
||||
|
6
modules/groups/groups_common/groups_common.info
Normal file
6
modules/groups/groups_common/groups_common.info
Normal 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
|
10
modules/groups/groups_common/groups_common.install
Normal file
10
modules/groups/groups_common/groups_common.install
Normal 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();
|
||||
}
|
10
modules/groups/groups_common/groups_common.module
Normal file
10
modules/groups/groups_common/groups_common.module
Normal 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';
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user