Commit f35caa4a authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 159901 - token.cgi: localize strings send to message.html.tmpl. Patch by burnus; r=gerv.

parent 61890499
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# token: string. The token to be used in this address change. # token: string. The token to be used in this address change.
#%] #%]
[% title = "Confirm Change Email" %]
[% PROCESS global/header.html.tmpl %] [% PROCESS global/header.html.tmpl %]
<p> <p>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
# Contributor(s): Gervase Markham <gerv@gerv.net> # Contributor(s): Gervase Markham <gerv@gerv.net>
#%] #%]
[% title = "Change Password" %]
[% PROCESS global/header.html.tmpl %] [% PROCESS global/header.html.tmpl %]
<p> <p>
......
...@@ -40,6 +40,23 @@ ...@@ -40,6 +40,23 @@
The cookie that was remembering your login is now gone. You will be The cookie that was remembering your login is now gone. You will be
prompted for a login the next time it is required. prompted for a login the next time it is required.
[% ELSIF message_tag == "login_changed" %]
[% title = "Bugzilla Login Changed" %]
Your Bugzilla login has been changed.
[% ELSIF message_tag == "password_changed" %]
[% title = "Password Changed" %]
Your password has been changed.
[% ELSIF message_tag == "password_change_canceled"
[% title = "Cancel Request to Change Password" %]
Your request has been cancelled.
[% ELSIF message_tag == "password_change_request" %]
[% title = "Request to Change Password" %]
A token for changing your password has been emailed to you.
Follow the instructions in that email to change your password.
[% ELSE %] [% ELSE %]
[%# Cope with legacy calling convention, where "message" was the string [%# Cope with legacy calling convention, where "message" was the string
# to print. # to print.
......
...@@ -172,10 +172,7 @@ exit; ...@@ -172,10 +172,7 @@ exit;
sub requestChangePassword { sub requestChangePassword {
Token::IssuePasswordToken($::FORM{'loginname'}); Token::IssuePasswordToken($::FORM{'loginname'});
$vars->{'title'} = "Request to Change Password"; $vars->{'message'} = "password_change_request";
$vars->{'message'} = "A token for changing your password has been
emailed to you. Follow the instructions in
that email to change your password.";
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars) $template->process("global/message.html.tmpl", $vars)
...@@ -183,7 +180,6 @@ sub requestChangePassword { ...@@ -183,7 +180,6 @@ sub requestChangePassword {
} }
sub confirmChangePassword { sub confirmChangePassword {
$vars->{'title'} = "Change Password";
$vars->{'token'} = $::token; $vars->{'token'} = $::token;
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
...@@ -194,8 +190,7 @@ sub confirmChangePassword { ...@@ -194,8 +190,7 @@ sub confirmChangePassword {
sub cancelChangePassword { sub cancelChangePassword {
Token::Cancel($::token, "user requested cancellation"); Token::Cancel($::token, "user requested cancellation");
$vars->{'title'} = "Cancel Request to Change Password"; $vars->{'message'} = "password_change_canceled";
$vars->{'message'} = "Your request has been cancelled.";
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars) $template->process("global/message.html.tmpl", $vars)
...@@ -222,8 +217,7 @@ sub changePassword { ...@@ -222,8 +217,7 @@ sub changePassword {
InvalidateLogins($userid); InvalidateLogins($userid);
$vars->{'title'} = "Password Changed"; $vars->{'message'} = "password_changed";
$vars->{'message'} = "Your password has been changed.";
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars) $template->process("global/message.html.tmpl", $vars)
...@@ -234,7 +228,6 @@ sub confirmChangeEmail { ...@@ -234,7 +228,6 @@ sub confirmChangeEmail {
# Return HTTP response headers. # Return HTTP response headers.
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
$vars->{'title'} = "Confirm Change Email";
$vars->{'token'} = $::token; $vars->{'token'} = $::token;
$template->process("account/email/confirm.html.tmpl", $vars) $template->process("account/email/confirm.html.tmpl", $vars)
...@@ -279,8 +272,7 @@ sub changeEmail { ...@@ -279,8 +272,7 @@ sub changeEmail {
# Let the user know their email address has been changed. # Let the user know their email address has been changed.
$vars->{'title'} = "Bugzilla Login Changed"; $vars->{'message'} = "login_changed";
$vars->{'message'} = "Your Bugzilla login has been changed.";
$template->process("global/message.html.tmpl", $vars) $template->process("global/message.html.tmpl", $vars)
|| ThrowTemplateError($template->error()); || ThrowTemplateError($template->error());
......
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