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
This commit is contained in:
timeless%mozdev.org 2003-10-15 22:48:12 +00:00
parent 6984371fce
commit 19efc5771e
3 changed files with 9 additions and 3 deletions

View File

@ -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 });
}
}

View File

@ -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;

View File

@ -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 %]