mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 08:13:43 +08:00
FEATURE: add a route to show the password reset dialog: /password-reset
This commit is contained in:
parent
0124187e3a
commit
55f293d062
|
@ -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'});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
0
app/views/static/password_reset.html.erb
Normal file
0
app/views/static/password_reset.html.erb
Normal 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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user