diff --git a/app/assets/javascripts/discourse/routes/app-route-map.js.es6 b/app/assets/javascripts/discourse/routes/app-route-map.js.es6 index 15d469230cf..b866d99a278 100644 --- a/app/assets/javascripts/discourse/routes/app-route-map.js.es6 +++ b/app/assets/javascripts/discourse/routes/app-route-map.js.es6 @@ -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'}); diff --git a/app/assets/javascripts/discourse/routes/forgot-password.js.es6 b/app/assets/javascripts/discourse/routes/forgot-password.js.es6 new file mode 100644 index 00000000000..e82fd5a8c4b --- /dev/null +++ b/app/assets/javascripts/discourse/routes/forgot-password.js.es6 @@ -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); + } +}); diff --git a/app/views/static/password_reset.html.erb b/app/views/static/password_reset.html.erb new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 3294e75a412..82934516fc4 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -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" diff --git a/config/routes.rb b/config/routes.rb index 5e8d9ef728e..ccf716477d8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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"