注册激活页的留言,请更新留言的标题

This commit is contained in:
daiao 2017-02-28 09:53:36 +08:00
parent 5e4c96e864
commit dda9858e21
2 changed files with 27 additions and 15 deletions

View File

@ -10,13 +10,10 @@
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" onclick="change_user_email()">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果您始终无法收到激活邮件,请直接给我们留言:</li>
<div class="mt10">
<% get_memo %>
<%= form_for(@new_memo, :url => mail_feedback_forum_path(@public_forum, :user_id => @user.id), :remote => true) do |f| %>
<%= f.text_area :subject, :id => "subject", :class => "email_prompt_mes", :style => "width: 568px;", :placeholder => l(:label_email_feedback_tips) %>
<%= f.hidden_field :content, :id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<span class="c_red fl" id="mail_valid_feedback_tip" style="display: none;">内容不能为空</span>
<a href="javascript:void(0);" class="btn btn-blue fr" onclick="f_submit();">确定</a>
<% end %>
<textarea style="resize: none;width: 570px;" class="email_prompt_mes" placeholder="<%= l(:label_email_feedback_tips) %>"></textarea>
<div class="c1"></div>
<button class="email_sub_btn fr" onclick="leave_email_activation_message('<%= leave_email_activation_message_path(1)%>','<%= @user.id %>');">确定</button>
<div class="cl"></div>
</div>
</ul>
</div>

View File

@ -19,14 +19,10 @@
<li>请点击重新发送激活邮件按钮</li>
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" onclick="change_user_email()">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果您始终无法收到激活邮件,请直接给我们留言:</li>
<div class="mt10 clearfix">
<% get_memo %>
<%= form_for(@new_memo, :url => mail_feedback_forum_path(@public_forum, :user_id => @user.id), :remote => true) do |f| %>
<%= f.text_area :subject, :id => "subject", :class => "email_prompt_mes", :style => "width: 568px;", :placeholder => l(:label_email_feedback_tips) %>
<%= f.hidden_field :content, :id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<span class="c_red fl" id="mail_valid_feedback_tip" style="display: none;">内容不能为空</span>
<a href="javascript:void(0);" class="btn btn-blue fr" onclick="f_submit();">确定</a>
<% end %>
<div class="mt10">
<textarea style="resize: none;width: 570px;" class="email_prompt_mes" placeholder="<%= l(:label_email_feedback_tips) %>"></textarea>
<div class="c1"></div>
<button class="email_sub_btn fr" onclick="leave_email_activation_message('<%= leave_email_activation_message_path(1)%>','<%= @user.id %>');">确定</button>
<div class="cl"></div>
</div>
</ul>
@ -34,7 +30,26 @@
</div>
<script>
function leave_email_activation_message(url,user)
{
if ($(".email_prompt_mes").val().length == 0){
//弹框请他输入文字
var htmlvalue = "</br><div style='width:550px;text-align:center'>您的留言不能为空</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50);
return;
}
$.ajax({
url: url,
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>"
pop_up_box(htmlvalue, 580, 30, 50);
$(".email_prompt_mes").val("");
}
});
}
function change_user_email(){
var htmlvalue = "<%= j (render :partial => 'account/change_user_email', :locals => {:user => @user}) %>";
pop_box_new(htmlvalue,520,316);