FEATURE: add a route to show the password reset dialog: /password-reset

This commit is contained in:
Neil Lalonde 2015-03-23 15:13:55 -04:00
parent 0124187e3a
commit 55f293d062
5 changed files with 25 additions and 1 deletions

View File

@ -84,6 +84,7 @@ export default function() {
this.route('signup', {path: '/signup'});
this.route('login', {path: '/login'});
this.route('forgot-password', {path: '/password-reset'});
this.route('faq', {path: '/faq'});
this.route('tos', {path: '/tos'});
this.route('privacy', {path: '/privacy'});

View File

@ -0,0 +1,22 @@
export default Discourse.Route.extend({
beforeModel: function() {
this.replaceWith('discovery.latest').then(function(e) {
Ember.run.next(function() {
e.send('showForgotPassword');
});
});
},
model: function() {
return Discourse.StaticPage.find('password-reset');
},
renderTemplate: function() {
// do nothing
this.render('static');
},
setupController: function(controller, model) {
this.controllerFor('static').set('model', model);
}
});

View File

View File

@ -629,7 +629,7 @@ en:
failed: "Something went wrong, perhaps this email is already registered, try the forgot password link"
forgot_password:
title: "Forgot Password"
title: "Password Reset"
action: "I forgot my password"
invite: "Enter your username or email address, and we'll send you a password reset email."
reset: "Reset Password"

View File

@ -222,6 +222,7 @@ Discourse::Application.routes.draw do
resources :static
post "login" => "static#enter"
get "login" => "static#show", id: "login"
get "password-reset" => "static#show", id: "password_reset"
get "faq" => "static#show", id: "faq"
get "guidelines" => "static#show", id: "guidelines"
get "tos" => "static#show", id: "tos"