Commit fa2c1163 authored by timeless%mozdev.org's avatar timeless%mozdev.org

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
parent c07813cf
......@@ -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 });
}
}
......
......@@ -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;
......
......@@ -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 %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment