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 (\%$;\@) { ...@@ -111,10 +111,11 @@ sub CheckFormField (\%$;\@) {
sub CheckFormFieldDefined (\%$) { sub CheckFormFieldDefined (\%$) {
my ($formRef, # a reference to the form to check (a hash) my ($formRef, # a reference to the form to check (a hash)
$fieldname, # the fieldname to check $fieldname, # the fieldname to check
$info, # (optional) error message to give
) = @_; ) = @_;
if (!defined $formRef->{$fieldname}) { 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 ...@@ -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'}) { SWITCH: for ($::FORM{'knob'}) {
/^none$/ && do { /^none$/ && do {
last SWITCH; last SWITCH;
......
...@@ -208,7 +208,12 @@ ...@@ -208,7 +208,12 @@
I was unable to retrieve your old password from the database. I was unable to retrieve your old password from the database.
[% ELSIF error == "undefined_field" %] [% 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" %] [% ELSIF error == "unknown_action" %]
[% IF 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