diff options
Diffstat (limited to 'mod/search/views/default/page_elements')
-rw-r--r-- | mod/search/views/default/page_elements/searchbox.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/search/views/default/page_elements/searchbox.php b/mod/search/views/default/page_elements/searchbox.php index cfc0b953b..f7746b0da 100644 --- a/mod/search/views/default/page_elements/searchbox.php +++ b/mod/search/views/default/page_elements/searchbox.php @@ -1,4 +1,16 @@ +<?php + +if (array_key_exists('value', $vars)) { + $value = $vars['value']; +} elseif ($value = get_input('q', get_input('tag', NULL))) { + $value = $value; +} else { + $value = elgg_echo('search'); +} + +?> + <form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get"> - <input type="text" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onclick="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' }" class="search_input" /> + <input type="text" size="21" name="q" value="<?php echo $value; ?>" onclick="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' }" class="search_input" /> <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" /> </form> |