diff options
author | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2005-06-01 18:35:04 +0200 |
---|---|---|
committer | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2005-06-01 18:35:04 +0200 |
commit | c1e3b7d9b49d6a9f9a47a6a19439fa2d377f9833 (patch) | |
tree | 04f684a711dc85d3524b59a2d2d9ebafb4fc660c | |
parent | 6037be5aa20f17baed31d2f061481c3a31341ef8 (diff) | |
download | rpg-c1e3b7d9b49d6a9f9a47a6a19439fa2d377f9833.tar.gz rpg-c1e3b7d9b49d6a9f9a47a6a19439fa2d377f9833.tar.bz2 |
keep search input on search page
This patch modifies the search input form so that the search input
is kept as long as the user stays on the search page. This is pure
comfort because he is able to optimise his query step by step without
the need of typing in the query multiple times.
darcs-hash:20050601163504-7ef76-aad10750707ba97810bc5c5185da3e8ad9ae7391.gz
-rw-r--r-- | inc/template.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php index 7d3765ee0..1f54c5f99 100644 --- a/inc/template.php +++ b/inc/template.php @@ -383,9 +383,16 @@ function tpl_actionlink($type,$pre='',$suf=''){ */ function tpl_searchform(){ global $lang; + global $ACT; + print '<form action="'.wl().'" accept-charset="utf-8" class="search" name="search" onsubmit="return svchk()">'; print '<input type="hidden" name="do" value="search" />'; - print '<input type="text" id="qsearch_in" accesskey="f" name="id" class="edit" onkeyup="ajax_qsearch.call(\'qsearch_in\',\'qsearch_out\')" />'; + print '<input type="text" '; + + if ($ACT == 'search') + print 'value="'.$_REQUEST['id'].'" '; /* keep search input as long as user stays on search page */ + + print 'id="qsearch_in" accesskey="f" name="id" class="edit" onkeyup="ajax_qsearch.call(\'qsearch_in\',\'qsearch_out\')" />'; print '<input type="submit" value="'.$lang['btn_search'].'" class="button" />'; print '<div id="qsearch_out" class="ajax_qsearch" onclick="this.style.display=\'none\'"></div>'; print '</form>'; |