Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9639b7dc
Commit
9639b7dc
authored
Feb 05, 2006
by
Steven Wittens
Browse files
-
#44850
: Allow search_box() to be used for non-node searches too
parent
15590cdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/system.module
View file @
9639b7dc
...
...
@@ -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
);
...
...
modules/system/system.module
View file @
9639b7dc
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment