邮件激活页面,并添加留言功能
This commit is contained in:
parent
91e452b0c8
commit
b2a53b65f8
|
@ -249,6 +249,7 @@ class AccountController < ApplicationController
|
|||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def resendmail
|
||||
result = {:status=>1, :email=>""}
|
||||
user = User.find(params[:user]) if params[:user]
|
||||
|
|
|
@ -19,11 +19,13 @@ class ForumsController < ApplicationController
|
|||
#@memo.forum_id = "1"
|
||||
#@memo.author_id = User.current.id
|
||||
#@forum = @memo.forum
|
||||
@type = params[:type]
|
||||
cs = CommentService.new
|
||||
@memo,message = cs.create_feedback params,User.current
|
||||
respond_to do |format|
|
||||
if !@memo.new_record?
|
||||
format.html { redirect_to forum_path(@memo.forum) }
|
||||
format.js
|
||||
else
|
||||
sort_init 'updated_at', 'desc'
|
||||
sort_update 'created_at' => "#{Memo.table_name}.created_at",
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
data: {user: user, text: $(".email_prompt_mes").val() },
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
var htmlvalue = "<div class='email_tancon'><h2 class='email_tan_title'>您的留言已发送</h2><p class='email_tan_p'>我们将尽快处理好,并通过邮件通知您。感谢您的反馈!</p></div>"
|
||||
var htmlvalue = "<div class='email_tancon'><h2 class='email_tan_title'>您的留言已发送</h2><p class='email_tan_p'>我们将尽快处理好并通知您。感谢您的反馈!</p></div>"
|
||||
pop_up_box(htmlvalue, 580, 30, 45);
|
||||
$(".email_prompt_mes").val("");
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<title><%= l(:label_regiter_account)%></title>
|
||||
|
||||
<% @user = User.find(12) %>
|
||||
<% email = @user.mail.split("@")[1] %>
|
||||
<div class="new_content">
|
||||
<div class="email_verify" style="width: 580px;">
|
||||
<p class="fb f18" style="color:green;"><i class="icon-ok mr5 f18"></i>注册成功!
|
||||
<span style=" color:#3b94d6; font-size:12px; font-weight:normal;">请在24小时内点击邮件中的链接来激活您的账号。</span></p>
|
||||
<p class="f14 mt30 mb5">请登录邮箱(<span class="c_red">hsasah@126.com</span>)收取账号激活邮件。<br/>点击邮件中的激活链接,方可使用该账号
|
||||
<p class="f14 mt30 mb5">请登录邮箱(<span class="c_red"><%= email %></span>)收取账号激活邮件。<br/>点击邮件中的激活链接,方可使用该账号
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://mail.<%= email %>" class="btn btn-blue" target="_blank"><%= l(:label_check_email)%></a>
|
||||
|
@ -22,9 +22,11 @@
|
|||
<li>4.如果您无法收到激活邮件,请直接给我们留言:</li>
|
||||
<div class="mt10 clearfix">
|
||||
<% get_memo %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<textarea class="email_prompt_mes" style="width: 568px;"></textarea>
|
||||
<button class="btn btn-blue fr">确定</button>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum, :type => "mail_valid"), :id => "mail_valid_new_memo", :remote => true) do |f| %>
|
||||
<%= f.text_area :subject, :id => "subject", :class => "email_prompt_mes", :style => "width: 568px;", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content, :id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<span class="c_grey fl">还能输入<span id="textCount" class="c_orange">50</span>个字符</span>
|
||||
<button href="javascript:void(0);" class="btn btn-blue fr" onclick="f_submit();">确定</button>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -32,21 +34,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%= l(:label_regiter_account)%></title>
|
||||
<style type="text/css">
|
||||
#jihuo {
|
||||
background-image: url("/images/jingtanhao.JPG");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<% @user = User.find(12) %>
|
||||
<% email = @user.mail.split("@")[1] %>
|
||||
<script>
|
||||
|
||||
function f_submit()
|
||||
{
|
||||
$("#mail_valid_new_memo").submit();
|
||||
}
|
||||
|
||||
var countdown = 60;
|
||||
function settime(val) {
|
||||
if (countdown == 0) {
|
||||
|
@ -66,36 +60,51 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
var u = navigator.userAgent;
|
||||
if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){
|
||||
$("#scrollsidebar").css("display","none");
|
||||
return;
|
||||
}
|
||||
$(".closeSidebar, .hide-side-bar").click(function(){
|
||||
$(".show_btn").css("display","none");
|
||||
$("#scrollsidebar").css("display","none");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#button1").click(function(){
|
||||
myTips("反馈成功","success");
|
||||
});
|
||||
|
||||
$("#scrollsidebar").fix({
|
||||
float: 'right', //default.left or right
|
||||
minStatue: cookieget('minStatue'),
|
||||
skin: 'green', //default.gray or blue
|
||||
durationTime: 600
|
||||
});
|
||||
|
||||
$("#subject").keydown(function(){
|
||||
alert("2222");
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
$("#subject").val(num);
|
||||
}
|
||||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
}).keyup(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
$("#subject").val(num);
|
||||
}
|
||||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<div style="border: 1px solid #c0c0c0 ; width:100%; margin-top: 10px" >
|
||||
|
||||
<h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; ">
|
||||
<span id = "jihuo" style=" margin-left: 4%;"></span><%= l(:label_email_valid)%></h3>
|
||||
|
||||
<div style="margin-left:auto; margin-right:auto">
|
||||
<center>
|
||||
<div >
|
||||
<h4 style="font-size: 18px;margin-top: 10px; padding-bottom: 10px;"><%= l(:notice_email_register_time) %></h4>
|
||||
<div class="to-email mb10" style="padding-bottom: 8px; font-size: 14px">
|
||||
<div class="to-email" style="padding-bottom:15px; font-size:14px; padding-top:10px;">
|
||||
<span ><%= l(:notice_email_arrival)%> : <%= @user.mail %></span>
|
||||
</div>
|
||||
<p>
|
||||
<a href="http://mail.<%= email %>" class="btn btn-blue" target="_blank"><%= l(:label_check_email)%></a>
|
||||
<%= link_to "<input class='btn btn-blue' type='button' id='btn' value='重新获取验证码' onclick='settime(this)' />".html_safe, { :controller => 'account', :action => 'resendmail', :user => @user}, :remote => true, :method => 'get' %>
|
||||
<!--<a href="<%#= resendmail_path(@user) %>" data-remote="true"><input class="btn btn-blue" type="button" id="btn" value="重新获取验证码" onclick="settime(this)" /></a>-->
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
|
@ -0,0 +1,21 @@
|
|||
<div id="sy_popup_box" style="width:380px;">
|
||||
<div class="sy_popup_top sy_popup_top_tishi">
|
||||
<h3 class="fl">提示</h3>
|
||||
<a href="javascript:void(0);" class="sy_icons_close02 fr" onclick="hideModal()"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="sy_popup_con02" >
|
||||
<ul class="sy_popup_tishi ">
|
||||
<li>
|
||||
<p>我们将尽快处理好并通知您。感谢您的反馈!</p>
|
||||
</li>
|
||||
<li>
|
||||
<% if @flag == 6 %>
|
||||
<%= link_to "知道了", project_path(@project), :class => "sy_btn_blue" %>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" class="sy_btn_blue " onclick="hideModal()">知道了</a>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -1,6 +1,11 @@
|
|||
<% if @type == "mail_valid" %>
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'forums/emali_valid_tip') %>";
|
||||
pop_box_new(htmlvalue,380,166);
|
||||
<% else %>
|
||||
$(function(){
|
||||
$("#button1").click(function(){
|
||||
myTips(<%= l(:label_forums_feedback_success)%>,"success");
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
<% end %>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
<%= stylesheet_link_tag 'css/common','css/structure','css/public', 'css/moduel', 'css/font-awesome', :media => 'all'%>
|
||||
<%= stylesheet_link_tag 'css/common','css/structure','css/public', 'css/moduel', 'css/font-awesome', 'css/popup', :media => 'all'%>
|
||||
<!-- MathJax的配置 -->
|
||||
<script type="text/javascript"
|
||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
|
|
Loading…
Reference in New Issue