aboutsummaryrefslogtreecommitdiff
path: root/mod/search/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/search/views/default')
-rw-r--r--mod/search/views/default/page_elements/searchbox.php18
-rw-r--r--mod/search/views/default/search/search_box.php20
2 files changed, 20 insertions, 18 deletions
diff --git a/mod/search/views/default/page_elements/searchbox.php b/mod/search/views/default/page_elements/searchbox.php
deleted file mode 100644
index f70a6ad97..000000000
--- a/mod/search/views/default/page_elements/searchbox.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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');
-}
-
-$value = stripslashes($value);
-
-?>
-
-<form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get">
- <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>
diff --git a/mod/search/views/default/search/search_box.php b/mod/search/views/default/search/search_box.php
new file mode 100644
index 000000000..d53efca21
--- /dev/null
+++ b/mod/search/views/default/search/search_box.php
@@ -0,0 +1,20 @@
+<?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');
+}
+
+$value = stripslashes($value);
+
+?>
+
+<div id="elgg_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'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="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>
+</div> \ No newline at end of file