修改邮件邀请提示信息!

This commit is contained in:
huang 2015-03-20 16:17:48 +08:00
parent ec8b7e4128
commit 72d41fd07a
1 changed files with 67 additions and 67 deletions

View File

@ -1,68 +1,68 @@
<script>
function verifyAddress() {
var email = $.trim($('#mail').val());
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if(email == "")
{
$("#valid_email").html("电子邮件不能为空");
}
else if (filter.test(email)) {
$("#valid_email").html("");
return true;
}
else
{
$("#valid_email").html("您所填写的电子邮件格式不正确");
}
return false;
}
function senderEmail(obj)
{
if(verifyAddress())
{
obj.parent().submit();
}
}
// if (filter.test(email)&& !(email.value == null)) return true;
// else
// {
// document.getElementById('valid_email').innerHTML = "您所填写的电子邮件格式不正确";
// document.getElementById('valid_email').style.color = "#FF0000";
// return false;
// }
//
// }
</script>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_invite_join)%></h2>
</div>
<div class="floatbox" style="margin:130px;">
<div >
<a href="#" class="box_close"></a>
</div>
<div class="cl"></div>
<div class="box_main">
<div style="padding-left: 20px;">
<h3 class="box_h3"><%= l(:label_invite_new_user)%></h3>
<p class="box_p">
<%= l(:label_invite_email_tips)%>
</p>
<div id="is_registed">
<%= render :partial => 'regested', locals: { :isregisted => false} %>
</div>
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
<span id="valid_email" style="color: #FF0000;"></span>
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "verifyAddress();" %>
<div class="cl"></div>
<div class="cl"></div>
<a href="#" class="btn_free" onclick="senderEmail($(this));">
<%= l(:label_send_email)%>
</a>
<%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
<% end %>
</div>
</div>
<script>
function verifyAddress() {
var email = $.trim($('#mail').val());
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if(email == "")
{
$("#valid_email").html("电子邮件不能为空");
}
else if (filter.test(email)) {
$("#valid_email").html("");
return true;
}
else
{
$("#valid_email").html("您所填写的邮件格式不正确");
}
return false;
}
function senderEmail(obj)
{
if(verifyAddress())
{
obj.parent().submit();
}
}
// if (filter.test(email)&& !(email.value == null)) return true;
// else
// {
// document.getElementById('valid_email').innerHTML = "您所填写的电子邮件格式不正确";
// document.getElementById('valid_email').style.color = "#FF0000";
// return false;
// }
//
// }
</script>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_invite_join)%></h2>
</div>
<div class="floatbox" style="margin:130px;">
<div >
<a href="#" class="box_close"></a>
</div>
<div class="cl"></div>
<div class="box_main">
<div style="padding-left: 20px;">
<h3 class="box_h3"><%= l(:label_invite_new_user)%></h3>
<p class="box_p">
<%= l(:label_invite_email_tips)%>
</p>
<div id="is_registed">
<%= render :partial => 'regested', locals: { :isregisted => false} %>
</div>
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
<span id="valid_email" style="color: #FF0000;"></span>
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "verifyAddress();" %>
<div class="cl"></div>
<div class="cl"></div>
<a href="#" class="btn_free" onclick="senderEmail($(this));">
<%= l(:label_send_email)%>
</a>
<%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
<% end %>
</div>
</div>
</div>