增加《注册跳转邮箱页面》

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-11-13 09:13:44 +08:00
parent ad6b32ff50
commit baacf328b7
5 changed files with 91 additions and 107 deletions

View File

@ -220,6 +220,7 @@ class AccountController < ApplicationController
end
def email_valid
end
private
@ -351,7 +352,7 @@ class AccountController < ApplicationController
UserStatus.create(:user_id => user.id, :changsets_count => 0, :watchers_count => 0)
Mailer.register(token).deliver
flash[:notice] = l(:notice_account_register_done)
render action: 'email_valid'
render action: 'email_valid', locals: {:mail => user.mail}
else
yield if block_given?
end

View File

@ -1,78 +1,53 @@
<head>
<meta charset="utf-8">
<title>注册帐号</title>
<style type="text/css">
.register-info {
background: #fff;
border: 1px solid #ddd;
padding: 16px 7px 59px 16px;
margin-top: 57px;
overflow: hidden;
text-align: center;
}
.register-info .cancel,
.register-info .continue {
display: inline-block;
zoom: 1;
*display: inline;
width: 81px;
height: 30px;
line-height: 30px;
color: #fff;
}
.register-info .cancel {
background: #999;
margin-right: 60px;
}
.register-info .continue {
background: #dc3c00;
}
.register-info h3 {
font-size: 1.166em;
font-weight: normal;
border-bottom: 1px solid #ddd;
padding-bottom: 12px;
margin: 0;
text-align: left;
}
.register-info h3 .icon {
display: inline-block;
margin-right: 10px;
width: 16px;
height: 16px;
vertical-align: middle;
}
</style>
<style type="text/css">
#jihuo {
background-image: url("../images/jingtanhao.JPG");
}
</style>
</head>
<body>
<% email = params[:mail] %>
<div class="register-info">
<h3><span class="icon"></span>邮箱激活</h3>
<div class="activation-email"><span class="icon-success-lg"></span>
<div class="content">
<h4>请在24小时内点击邮件中的链接继续完成注册</h4>
<div class="to-email">
<span class="summary">邮件已发送到邮箱</span>
<a href="#" class="f-blue">alanlong9278@126.com</a>
</div>
<span class="tracking-ad" data-mod="popu_29">
<% mail = "mail." + mail.split('@')[1] %>
<a href="http://<%= mail %>" class="btn-primary check-mail" target="_blank">立即查收邮件</a>
</span>
<span class="tracking-ad" data-mod="popu_30">
<a href="javascript:void(0);" class="f-blue no-email">没收到邮件?</a>
</span>
<div class="reSent-email"><span class="icon"></span>
<div class="cont">
<span>请先检查是否在垃圾邮件中</span>
<span class="tracking-ad" data-mod="popu_31">如果还未收到,
<a href="/account/register?action=resendActiveEmail&username=alanalan123456" class="reSent">重新发送邮件</a>
</span>
</div>
</div>
<% email = @user.mail.split("@")[1] %>
</div>
<div style="border: 1px solid #c0c0c0 ; width:850px;" >
<h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; ">
<span id = "jihuo" style=" margin-left: 4%;"></span>邮箱激活</h3>
<div style="margin-left:auto; margin-right:auto">
<center>
<div >
<h4 style="font-size: 18px;margin-top: 10px; margin-bottom: 10px;">请在24小时内点击邮件中的链接继续完成注册</h4>
<div class="to-email">
<span class="summary">邮件已发送到邮箱</span>
<a href="#" class="f-blue"><%= @user.mail %></a>
</div>
<p>
<a href="http://mail.<%= email %>" style="background: #15bccf;margin: auto;
color: #fff;
font-size: 13px;
border: none;
padding: 10px 16px;
line-height: 1.33;" target="_blank">立即查收邮件</a></p>
<span class="tracking-ad" >
<a href="javascript:void(0);" >没收到邮件?</a>
</span>
<div style = "margin-top: 10px; margin-bottom:10px;">
<span style="font-size: 16px">请先检查是否在垃圾邮件中</span>
</div>
</div>
</center>
</div>
</div>
</body>

View File

@ -68,6 +68,39 @@
<br/>
</p>
<p style="width:400px;padding-left: 54px;">
<%= l(:label_identity) %><span style="color: #ff0000">&nbsp;*</span>
<select onchange="showtechnical_title(this.value, $('#userTechnical_title'));" name="identity" id="userIdentity" class="location">
<option value="">
<%= l(:label_account_identity_choose) %>
</option>
<option value="0">
<%= l(:label_account_identity_teacher) %>
</option>
<option value="1">
<%= l(:label_account_identity_student) %>
</option>
<option value="2">
<%= l(:label_account_identity_enterprise) %>
</option>
<option value="3">
<%= l(:label_account_identity_developer) %>
</option>
</select>
<span id='technical_title' style='display:none'>
<select name="technical_title" id="userTechnical_title"></select>
</span>
<span id='no' style='display:none'>
<!-- modified by fq -->
<% unless User.current.user_extensions.student_id.nil? %>
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
<% else %>
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
<% end %>
<!-- end -->
</span>
</p>
<div>
<span id='name' style='display:none'>
<p style="width:530px;padding-left: 54px;">
@ -114,48 +147,16 @@
</span>
<p style="width:400px;padding-left: 54px;">
<%= l(:label_identity) %><span style="color: #ff0000">&nbsp;*</span>
<select onchange="showtechnical_title(this.value, $('#userTechnical_title'));" name="identity" id="userIdentity" class="location">
<option value="">
<%= l(:label_account_identity_choose) %>
</option>
<option value="0">
<%= l(:label_account_identity_teacher) %>
</option>
<option value="1">
<%= l(:label_account_identity_student) %>
</option>
<option value="2">
<%= l(:label_account_identity_enterprise) %>
</option>
<option value="3">
<%= l(:label_account_identity_developer) %>
</option>
</select>
<span id='technical_title' style='display:none'>
<select name="technical_title" id="userTechnical_title"></select>
</span>
<span id='no' style='display:none'>
<!-- modified by fq -->
<% unless User.current.user_extensions.student_id.nil? %>
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
<% else %>
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
<% end %>
<!-- end -->
</span>
</p>
<!-- added by Wen -->
<p id="occupation_detail" style="padding-left: 26px; display: none">
<% unless @user.user_extensions.identity == 2 %>
<%= l(:field_occupation) %>
<span class="required">*</span>
<% if User.current.user_extensions.identity == 3 %>
<% if User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
<input id="occupation" name="occupation" style="display: none" type="text" value="<%= @user.user_extensions.occupation %>" />
@ -171,7 +172,7 @@
<input id="occupation" name="occupation" type="text" style="display: none" value="<%= User.current.user_extensions.school.id %>"/>
<input id="occupation_name" type="text" style="display: none" value="<%= User.current.user_extensions.school.name %>" readonly="true" style="background-color: #E2E2E2;"/>
<% end %>
<% end %>
</p>
<div id="WOpenWindow">
@ -590,9 +591,11 @@
$('#name').show()
$('#enterprise').hide()
$('#gender').show()
$('#occupation_detail').show()
$('input#province').show()
$('input#occupation_name').show()
$('input#occupation').hide()
var technical_titleOptions = new Array(
"<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>");
break;
@ -603,9 +606,11 @@
$('#name').show()
$('#enterprise').hide()
$('#gender').show()
$('#occupation_detail').show()
$('input#province').show()
$('input#occupation_name').show()
$('input#occupation').hide()
var technical_titleOptions = new Array(
"<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>");
@ -628,6 +633,7 @@
$('#name').show()
$('#enterprise').hide()
$('#gender').show()
$('#occupation_detail').show()
$('input#province').hide()
$('input#occupation_name').hide()
$('input#occupation').show()
@ -642,6 +648,7 @@
$('#name').show()
$('#enterprise').hide()
$('#gender').show()
$('#occupation_detail').show()
var technical_titleOptions = new Array(
"<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>");

View File

@ -8,7 +8,8 @@
) %>
</p>
<%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
<%= render_project_nested_lists_new(@user.projects) do |project|
<p><em style="color: #acaeb1"><%= l(:text_user_mail_option) %></em></p>
<%= render_project_nested_lists_new(@user.projects) do |project|
content_tag('label',
check_box_tag(
'notified_project_ids[]',
@ -17,7 +18,7 @@
) + ' ' + h(project.name)
)
end %>
<p><em class="info"><%= l(:text_user_mail_option) %></em></p>
<% end %>
<p>
<label>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB