注册激活页面的更换邮箱,更换一次之后,第二次弹框显示的原邮箱不正确

This commit is contained in:
daiao 2017-03-01 15:51:12 +08:00
parent 3430620f10
commit 20cc376246
5 changed files with 26 additions and 10 deletions

View File

@ -4446,6 +4446,10 @@ class UsersController < ApplicationController
format.html {render :layout => 'clear_base'}
end
end
# 邮件激活页面,用户修改邮件地址弹框
def change_user_email
@user = User.find params[:id]
end
private
def show_system_message

View File

@ -7,7 +7,7 @@
<p class="email_prompt_p">如果您尚未收到激活邮件,请按照以下步骤操作:</p>
<li>检查邮箱的“订阅邮件”、“垃圾邮件”,可能会发现激活邮件。 </li>
<li>如果激活邮件已无效,请点击重新发送激活邮件按钮。</li>
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" onclick="change_user_email()">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" id="change_email">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果您始终无法收到激活邮件,请直接给我们留言:</li>
<div class="mt10">
<textarea style="resize: none;width: 570px;" class="email_prompt_mes" placeholder="<%= l(:label_email_feedback_tips) %>"></textarea>
@ -19,10 +19,14 @@
</div>
</div>
<script type="text/javascript">
function change_user_email(){
var htmlvalue = "<%= j (render :partial => 'account/change_user_email', :locals => {:user => @user}) %>";
pop_box_new(htmlvalue,520,316);
}
$(document).ready(function(){
$("#change_email").click(function(){
$.ajax({
url: "<%= change_user_email_user_path(@user) %>"
});
});
});
function resendMail(url,id)
{
$.get(

View File

@ -17,7 +17,7 @@
<li>请确认是否填写了正确的邮箱地址 </li>
<li>请注意查看邮箱中的“订阅邮件”、“垃圾邮件”可能Trustie的邮件被误杀了</li>
<li>请点击重新发送激活邮件按钮</li>
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" onclick="change_user_email()">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" id="change_email">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果您始终无法收到激活邮件,请直接给我们留言:</li>
<div class="mt10">
<textarea style="resize: none;width: 570px;" class="email_prompt_mes" placeholder="<%= l(:label_email_feedback_tips) %>"></textarea>
@ -30,6 +30,15 @@
</div>
<script>
$(document).ready(function(){
$("#change_email").click(function(){
$.ajax({
url: "<%= change_user_email_user_path(@user) %>"
});
});
});
function leave_email_activation_message(url,user)
{
if ($(".email_prompt_mes").val().length == 0){
@ -50,10 +59,6 @@
}
});
}
function change_user_email(){
var htmlvalue = "<%= j (render :partial => 'account/change_user_email', :locals => {:user => @user}) %>";
pop_box_new(htmlvalue,520,316);
}
function regex_mv_name()
{
var name = $.trim($("#subject").val());

View File

@ -0,0 +1,2 @@
var htmlvalue = "<%= j (render :partial => 'account/change_user_email', :locals => {:user => @user}) %>";
pop_box_new(htmlvalue,520,316);

View File

@ -709,6 +709,7 @@ RedmineApp::Application.routes.draw do
get 'user_import_resource'
match 'watch_projects', :to => 'users#watch_projects', :via => :get
get 'update_message_viewed'
get 'change_user_email'
#
# added by bai
match 'show_score', :to => 'users#show_score', :via => :get