summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortimeless%mozdev.org <>2003-10-16 07:48:09 +0200
committertimeless%mozdev.org <>2003-10-16 07:48:09 +0200
commitfa2c116330bd2023dc14a09c0e8a986d62dc6be0 (patch)
tree3f8576b70667513d18f781921db060b8b39f161f
parentc07813cf195d2934580f9d6f3caa4d819fb62f4b (diff)
downloadbugzilla-fa2c116330bd2023dc14a09c0e8a986d62dc6be0.tar.gz
bugzilla-fa2c116330bd2023dc14a09c0e8a986d62dc6be0.tar.xz
Bug 108528 - knob is not defined doesn't explain to 2001110503 users what to do
patch by caduvall@glue.umd.edu r=timeless a=justdave
-rw-r--r--CGI.pl3
-rwxr-xr-xprocess_bug.cgi2
-rw-r--r--template/en/default/global/code-error.html.tmpl7
3 files changed, 9 insertions, 3 deletions
diff --git a/CGI.pl b/CGI.pl
index bcd9a7f90..06db6fe55 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -111,10 +111,11 @@ sub CheckFormField (\%$;\@) {
sub CheckFormFieldDefined (\%$) {
my ($formRef, # a reference to the form to check (a hash)
$fieldname, # the fieldname to check
+ $info, # (optional) error message to give
) = @_;
if (!defined $formRef->{$fieldname}) {
- ThrowCodeError("undefined_field", { field => $fieldname });
+ ThrowCodeError("undefined_field", { field => $fieldname, info => $info });
}
}
diff --git a/process_bug.cgi b/process_bug.cgi
index e504fd7ea..d3155af33 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -858,7 +858,7 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc
}
-CheckFormFieldDefined(\%::FORM, 'knob');
+CheckFormFieldDefined(\%::FORM, 'knob', "check that \"Leave as...\" was selected.");
SWITCH: for ($::FORM{'knob'}) {
/^none$/ && do {
last SWITCH;
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index 73501672b..458f55c55 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -208,7 +208,12 @@
I was unable to retrieve your old password from the database.
[% ELSIF error == "undefined_field" %]
- [% field FILTER html %] was not defined; [% Param('browserbugmessage') %]
+ [% field FILTER html %] was not defined;
+ [% IF info %]
+ [% info FILTER html %]
+ [% ELSE %]
+ [% Param('browserbugmessage') %]
+ [% END %]
[% ELSIF error == "unknown_action" %]
[% IF action %]