@@ -70,7 +70,7 class AccountController < ApplicationController | |||||
70 | if token.save |
|
70 | if token.save | |
71 | Mailer.lost_password(token).deliver |
|
71 | Mailer.lost_password(token).deliver | |
72 | flash[:notice] = l(:notice_account_lost_email_sent) |
|
72 | flash[:notice] = l(:notice_account_lost_email_sent) | |
73 |
redirect_to |
|
73 | redirect_to signin_path | |
74 | return |
|
74 | return | |
75 | end |
|
75 | end | |
76 | end |
|
76 | end | |
@@ -129,7 +129,7 class AccountController < ApplicationController | |||||
129 | token.destroy |
|
129 | token.destroy | |
130 | flash[:notice] = l(:notice_account_activated) |
|
130 | flash[:notice] = l(:notice_account_activated) | |
131 | end |
|
131 | end | |
132 |
redirect_to |
|
132 | redirect_to signin_path | |
133 | end |
|
133 | end | |
134 |
|
134 | |||
135 | private |
|
135 | private | |
@@ -224,7 +224,7 class AccountController < ApplicationController | |||||
224 | def onthefly_creation_failed(user, auth_source_options = { }) |
|
224 | def onthefly_creation_failed(user, auth_source_options = { }) | |
225 | @user = user |
|
225 | @user = user | |
226 | session[:auth_source_registration] = auth_source_options unless auth_source_options.empty? |
|
226 | session[:auth_source_registration] = auth_source_options unless auth_source_options.empty? | |
227 |
render |
|
227 | render register_path | |
228 | end |
|
228 | end | |
229 |
|
229 | |||
230 | def invalid_credentials |
|
230 | def invalid_credentials | |
@@ -240,7 +240,7 class AccountController < ApplicationController | |||||
240 | if user.save and token.save |
|
240 | if user.save and token.save | |
241 | Mailer.register(token).deliver |
|
241 | Mailer.register(token).deliver | |
242 | flash[:notice] = l(:notice_account_register_done) |
|
242 | flash[:notice] = l(:notice_account_register_done) | |
243 |
redirect_to |
|
243 | redirect_to signin_path | |
244 | else |
|
244 | else | |
245 | yield if block_given? |
|
245 | yield if block_given? | |
246 | end |
|
246 | end | |
@@ -277,6 +277,6 class AccountController < ApplicationController | |||||
277 |
|
277 | |||
278 | def account_pending |
|
278 | def account_pending | |
279 | flash[:notice] = l(:notice_account_pending) |
|
279 | flash[:notice] = l(:notice_account_pending) | |
280 |
redirect_to |
|
280 | redirect_to signin_path | |
281 | end |
|
281 | end | |
282 | end |
|
282 | end |
@@ -1,6 +1,6 | |||||
1 | <%= call_hook :view_account_login_top %> |
|
1 | <%= call_hook :view_account_login_top %> | |
2 | <div id="login-form"> |
|
2 | <div id="login-form"> | |
3 |
<%= form_tag( |
|
3 | <%= form_tag(signin_path) do %> | |
4 | <%= back_url_hidden_field_tag %> |
|
4 | <%= back_url_hidden_field_tag %> | |
5 | <table> |
|
5 | <table> | |
6 | <tr> |
|
6 | <tr> | |
@@ -28,7 +28,7 | |||||
28 | <tr> |
|
28 | <tr> | |
29 | <td align="left"> |
|
29 | <td align="left"> | |
30 | <% if Setting.lost_password? %> |
|
30 | <% if Setting.lost_password? %> | |
31 |
<%= link_to l(:label_password_lost), |
|
31 | <%= link_to l(:label_password_lost), lost_password_path %> | |
32 | <% end %> |
|
32 | <% end %> | |
33 | </td> |
|
33 | </td> | |
34 | <td align="right"> |
|
34 | <td align="right"> |
@@ -1,11 +1,11 | |||||
1 | <h2><%=l(:label_password_lost)%></h2> |
|
1 | <h2><%=l(:label_password_lost)%></h2> | |
2 |
|
2 | |||
3 | <div class="box"> |
|
3 | <%= form_tag(lost_password_path) do %> | |
4 | <%= form_tag({:action=> "lost_password"}, :class => "tabular") do %> |
|
4 | <div class="box tabular"> | |
5 |
|
5 | <p> | ||
6 |
|
|
6 | <label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label> | |
7 | <%= text_field_tag 'mail', nil, :size => 40 %> |
|
7 | <%= text_field_tag 'mail', nil, :size => 40 %> | |
8 |
<%= submit_tag l(:button_submit) %> |
|
8 | <%= submit_tag l(:button_submit) %> | |
9 |
|
9 | </p> | ||
|
10 | </div> | |||
10 | <% end %> |
|
11 | <% end %> | |
11 | </div> |
|
@@ -1,6 +1,6 | |||||
1 | <h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2> |
|
1 | <h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2> | |
2 |
|
2 | |||
3 |
<%= labelled_form_for @user, :url => |
|
3 | <%= labelled_form_for @user, :url => register_path do |f| %> | |
4 | <%= error_messages_for 'user' %> |
|
4 | <%= error_messages_for 'user' %> | |
5 |
|
5 | |||
6 | <div class="box tabular"> |
|
6 | <div class="box tabular"> |
@@ -20,8 +20,8 RedmineApp::Application.routes.draw do | |||||
20 |
|
20 | |||
21 | match 'login', :to => 'account#login', :as => 'signin' |
|
21 | match 'login', :to => 'account#login', :as => 'signin' | |
22 | match 'logout', :to => 'account#logout', :as => 'signout' |
|
22 | match 'logout', :to => 'account#logout', :as => 'signout' | |
23 | match 'account/register', :to => 'account#register', :via => [:get, :post] |
|
23 | match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register' | |
24 | match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post] |
|
24 | match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password' | |
25 | match 'account/activate', :to => 'account#activate', :via => :get |
|
25 | match 'account/activate', :to => 'account#activate', :via => :get | |
26 |
|
26 | |||
27 | match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news' |
|
27 | match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news' |
@@ -162,7 +162,7 end | |||||
162 |
|
162 | |||
163 | Redmine::MenuManager.map :account_menu do |menu| |
|
163 | Redmine::MenuManager.map :account_menu do |menu| | |
164 | menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? } |
|
164 | menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? } | |
165 |
menu.push :register, |
|
165 | menu.push :register, :register_path, :if => Proc.new { !User.current.logged? && Setting.self_registration? } | |
166 | menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? } |
|
166 | menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? } | |
167 | menu.push :logout, :signout_path, :if => Proc.new { User.current.logged? } |
|
167 | menu.push :logout, :signout_path, :if => Proc.new { User.current.logged? } | |
168 | end |
|
168 | end |
General Comments 0
You need to be logged in to leave comments.
Login now