From 3844d9ddaf6d8a3af296568ed659c3344fd36b6d Mon Sep 17 00:00:00 2001 From: "preed%sigkill.com" <> Date: Sun, 11 Aug 2002 21:12:32 +0000 Subject: Bug 160410: defparams.pl support for single/multi pulldown menus; p=preed,r=joel,r2=bbaetz --- editparams.cgi | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'editparams.cgi') diff --git a/editparams.cgi b/editparams.cgi index 40f5ad537..0e1b7161f 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -19,6 +19,7 @@ # Rights Reserved. # # Contributor(s): Terry Weissman +# J. Paul Reed use diagnostics; @@ -30,7 +31,8 @@ require "defparams.pl"; # Shut up misguided -w warnings about "used only once": use vars @::param_desc, - @::param_list; + @::param_list, + @::param_default; ConnectToDatabase(); confirm_login(); @@ -87,6 +89,48 @@ foreach my $i (@::param_list) { print "Off\n"; last SWITCH; }; + /^m$/ && do { + my $optList = $::param_default{$i}->[0]; #'cause we use it so much + ## showing 5 options seems like a nice round number; this should + ## probably be configurable; if you care, file a bug ;-) + my $boxSize = scalar(@{$optList}) < 5 ? scalar(@{$optList}) : 5; + + print "\n"; + last SWITCH; + }; + /^s$/ && do { + print "\n"; + last SWITCH; + }; # DEFAULT print "Unknown param type $::param_type{$i}!!!\n"; } -- cgit v1.2.3-24-g4f1b