用户注册激活页面内容为空的时候增加提示

This commit is contained in:
huang 2016-12-29 14:56:11 +08:00
parent b57384778e
commit b9d2e08aae
1 changed files with 21 additions and 6 deletions

View File

@ -10,9 +10,7 @@
<p>
<a href="http://mail.<%= email %>" class="btn btn-blue" target="_blank"><%= l(:label_check_email)%></a>
&nbsp; &nbsp; <%= 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>
<!--<button class="btn btn-blue " >立即查收邮件</button>-->
<ul class="email_prompt_txt mt30" style="width: 580px;">
<p class="email_prompt_p">如果您一直收不到激活邮件,请按照以下步骤操作:</p>
@ -22,11 +20,11 @@
<li>4.如果您无法收到激活邮件,请直接给我们留言:</li>
<div class="mt10 clearfix">
<% get_memo %>
<%= form_for(@new_memo, :url => mail_feedback_forum_path(@public_forum, :user_id => @user.id), :id => "mail_valid_new_memo", :remote => true) do |f| %>
<%= 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_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>
<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="cl"></div>
</div>
@ -35,10 +33,27 @@
</div>
<script>
function regex_mv_name()
{
var name = $.trim($("#subject").val());
if(name.length == 0)
{
$("#mail_valid_feedback_tip").show();
return false;
}
else
{
$("#mail_valid_feedback_tip").hide();
return true;
}
}
function f_submit()
{
$("#mail_valid_new_memo").submit();
if(regex_mv_name()){
alert("222");
$("#new_memo").submit();
}
}
var countdown = 60;