From 4553bfa1257648608ea4155691b92564b0305f4d Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 19 Nov 2008 18:47:06 +0000 Subject: [PATCH] Always show search box --- cron/CHANGELOG | 2 ++ cron/index.cgi | 13 ++++++++----- cron/lang/en | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cron/CHANGELOG b/cron/CHANGELOG index 4e616ce6e..322b022f1 100644 --- a/cron/CHANGELOG +++ b/cron/CHANGELOG @@ -32,3 +32,5 @@ Added a check for a valid module configuration, especially the cron jobs directo Added an access control option to prevent individual Webmin users from creating cron jobs that run more often than hourly. ---- Changes since 1.420 ---- Disable time and day lists when 'All' is selected, to indicate that they are un-usable. +---- Changes since 1.440 ---- +The search form for jobs is always visible, even when there are not too many jobs to show. diff --git a/cron/index.cgi b/cron/index.cgi index ae501b1af..8db73459f 100755 --- a/cron/index.cgi +++ b/cron/index.cgi @@ -196,13 +196,16 @@ if ($in{'search'}) { @rows; } +# Show search form +print &ui_form_start("index.cgi"); +print "$text{'index_search'}\n"; +print &ui_textbox("search", $in{'search'}, 20); +print &ui_submit($text{'index_ok'}); +print &ui_form_end(); + # Check if we are over the display limit if ($max_jobs && @rows > $max_jobs && !$in{'search'}) { - print &ui_form_start("index.cgi"); - print "$text{'index_toomany'}\n"; - print &ui_textbox("search", $in{'search'}, 20); - print &ui_submit($text{'index_ok'}); - print &ui_form_end(); + print "$text{'index_toomany2'}

\n"; print &ui_links_row(\@crlinks); } elsif (@rows) { diff --git a/cron/lang/en b/cron/lang/en index 5ef27f082..14d4aa1d1 100644 --- a/cron/lang/en +++ b/cron/lang/en @@ -21,7 +21,8 @@ index_delete=Delete Selected Jobs index_disable=Disable Selected Jobs index_enable=Enable Selected Jobs index_esearch=No jobs matched your search for $1. -index_toomany=There are too many jobs to show. Find those matching : +index_toomany2=There are too many jobs to show. Use the search form above to limit the list. +index_search=Find Cron jobs matching index_ok=Search index_searchres=Cron jobs matching $1 .. index_reset=Reset search.