From 7956db275a13d70a6b9fb672cf085b78e70f124c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 28 May 2016 13:40:48 +0000 Subject: Simplify search form: minus two visible control elements, minus one table, minus twenty lines of code, no loss of functionality. No idea why i didn't do this earlier... --- cgi.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'cgi.c') diff --git a/cgi.c b/cgi.c index 096b7ff9..ce7e1242 100644 --- a/cgi.c +++ b/cgi.c @@ -385,8 +385,7 @@ resp_searchform(const struct req *req, enum focus focus) /* Write query input box. */ - printf( "
\n" - "q.query != NULL) html_print(req->q.query); printf( "\" size=\"40\""); @@ -394,24 +393,16 @@ resp_searchform(const struct req *req, enum focus focus) printf(" autofocus"); puts(">"); - /* Write submission and reset buttons. */ + /* Write submission buttons. */ - printf( "\n" - "\n"); - - /* Write show radio button */ - - printf( "\n" - "q.equal) - printf("checked=\"checked\" "); - printf( "name=\"apropos\" id=\"show\" value=\"0\">\n" - "\n"); + printf( "\n" + "\n
\n"); /* Write section selector. */ - puts( "
\n" - ""); for (i = 0; i < sec_MAX; i++) { printf("\n" - "q.equal) - printf("checked=\"checked\" "); - printf( "name=\"apropos\" id=\"search\" value=\"1\">\n" - "\n"); - - puts("
\n" - "\n" + puts("\n" "\n" ""); puts(""); -- cgit