diff --git a/modules/search/search-block-form.tpl.php b/modules/search/search-block-form.tpl.php
deleted file mode 100644
index da58403..0000000
--- a/modules/search/search-block-form.tpl.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- *
- *
- * @endcode
- *
- * @see template_preprocess_search_block_form()
- */
-?>
-
- subject)): ?>
-
-
-
-
diff --git a/modules/search/search.module b/modules/search/search.module
index 518272a..af00f0c 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -101,10 +101,6 @@ function search_help($path, $arg) {
*/
function search_theme() {
return array(
- 'search_block_form' => array(
- 'render element' => 'form',
- 'template' => 'search-block-form',
- ),
'search_result' => array(
'variables' => array('result' => NULL, 'module' => NULL),
'file' => 'search.pages.inc',
@@ -151,12 +147,22 @@ function search_block_info() {
*/
function search_block_view($delta = '') {
if (user_access('search content')) {
+ $block['subject'] = t('Search form');
$block['content'] = drupal_get_form('search_block_form');
return $block;
}
}
/**
+ * Implements hook_preprocess_block().
+ */
+function search_preprocess_block(&$variables) {
+ if ($variables['block']->module == 'search' && $variables['block']->delta == 'form') {
+ $variables['title_attributes_array']['class'][] = 'element-invisible';
+ }
+}
+
+/**
* Implements hook_menu().
*/
function search_menu() {
@@ -1007,6 +1013,7 @@ function search_form($form, &$form_state, $action = '', $keys = '', $module = NU
* @see search-block-form.tpl.php
*/
function search_box($form, &$form_state, $form_id) {
+ $form['#attributes']['class'] = 'container-inline';
$form[$form_id] = array(
'#type' => 'textfield',
'#title' => t('Search'),
@@ -1055,33 +1062,6 @@ function search_box_form_submit($form, &$form_state) {
}
/**
- * Process variables for search-block-form.tpl.php.
- *
- * The $variables array contains the following arguments:
- * - $form
- *
- * @see search-block-form.tpl.php
- */
-function template_preprocess_search_block_form(&$variables) {
- $variables['search'] = array();
- $hidden = array();
- // Provide variables named after form keys so themers can print each element independently.
- foreach (element_children($variables['form']) as $key) {
- $type = $variables['form'][$key]['#type'];
- if ($type == 'hidden' || $type == 'token') {
- $hidden[] = drupal_render($variables['form'][$key]);
- }
- else {
- $variables['search'][$key] = drupal_render($variables['form'][$key]);
- }
- }
- // Hidden form elements have no value to themers. No need for separation.
- $variables['search']['hidden'] = implode($hidden);
- // Collect all form elements to make it easier to print the whole form.
- $variables['search_form'] = implode($variables['search']);
-}
-
-/**
* Performs a search by calling hook_search_execute().
*
* @param $keys