- #44850: Allow search_box() to be used for non-node searches too

4.7.x
Steven Wittens 2006-02-05 19:17:00 +00:00
parent 15590cdc06
commit 9639b7dc56
2 changed files with 16 additions and 4 deletions

View File

@ -1206,13 +1206,19 @@ function system_theme_settings($key = '') {
}
function search_box() {
$form['#action'] = url('search');
/**
* Output a search form.
*/
function search_box($path = NULL) {
$form['#action'] = is_null($path) ? url('search') : url($path);
$form['keys'] = array('#type' => 'textfield', '#size'=> 15, '#value' => '', '#attributes' => array('alt' => t('Enter the terms you wish to search for.')));
$form['submit'] = array('#type' => 'submit', '#value' => t('Search'));
return drupal_get_form('search_box', $form);
}
/**
* Theme a search form.
*/
function theme_search_box($form) {
$output = '<div id="search" class="container-inline">';
$output .= form_render($form);

View File

@ -1206,13 +1206,19 @@ function system_theme_settings($key = '') {
}
function search_box() {
$form['#action'] = url('search');
/**
* Output a search form.
*/
function search_box($path = NULL) {
$form['#action'] = is_null($path) ? url('search') : url($path);
$form['keys'] = array('#type' => 'textfield', '#size'=> 15, '#value' => '', '#attributes' => array('alt' => t('Enter the terms you wish to search for.')));
$form['submit'] = array('#type' => 'submit', '#value' => t('Search'));
return drupal_get_form('search_box', $form);
}
/**
* Theme a search form.
*/
function theme_search_box($form) {
$output = '<div id="search" class="container-inline">';
$output .= form_render($form);