]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 108528 - knob is not defined doesn't explain to 2001110503 users what to do
authortimeless%mozdev.org <>
Thu, 16 Oct 2003 05:48:09 +0000 (05:48 +0000)
committertimeless%mozdev.org <>
Thu, 16 Oct 2003 05:48:09 +0000 (05:48 +0000)
patch by caduvall@glue.umd.edu r=timeless a=justdave

CGI.pl
process_bug.cgi
template/en/default/global/code-error.html.tmpl

diff --git a/CGI.pl b/CGI.pl
index bcd9a7f90042bffda9d27dbbb8ee72ac152a9be6..06db6fe554cb449c480c0e3df1c7be36c2014537 100644 (file)
--- 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 });
     }
 }
 
index e504fd7ea9f3b13c1a335a542eb6907043b8ad12..d3155af3364a8d1ccb9a367b42f03aa3248d2316 100755 (executable)
@@ -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;
index 73501672b9bb5a0e6d2fb50ec1cb76f937975fcf..458f55c559a3197cdd057b53dec2104018438860 100644 (file)
      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 %]