socialforge/app/views/projects/invite_members_by_mail.html...

66 lines
2.2 KiB
Plaintext
Raw Normal View History

<script>
2015-03-12 18:04:12 +08:00
function verifyAddress() {
var email = $.trim($('#mail').val());
2015-03-12 17:48:31 +08:00
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)) {
2015-03-12 18:04:12 +08:00
$("#valid_email").html("");
return true;
2015-03-12 18:04:12 +08:00
}
else
{
$("#valid_email").html("您所填写的电子邮件格式不正确");
2015-03-12 17:48:31 +08:00
}
return false;
}
function senderEmail(obj)
{
if(verifyAddress())
{
obj.parent().submit();
}
2015-03-12 18:04:12 +08:00
}
// 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>
2015-03-09 11:31:42 +08:00
<div class="project_r_h">
2015-03-13 09:46:05 +08:00
<h2 class="project_h2"><%= l(:label_invite_join)%></h2>
2015-03-09 11:31:42 +08:00
</div>
<div class="floatbox" style="margin:130px;">
<div >
<a href="#" class="box_close"></a>
</div>
<div class="cl"></div>
<div class="box_main">
2015-03-13 09:46:05 +08:00
<h3 class="box_h3"><%= l(:label_invite_new_user)%></h3>
2015-03-09 11:31:42 +08:00
<p class="box_p">
2015-03-13 09:46:05 +08:00
<%= l(:label_invite_email_tips)%>
2015-03-09 11:31:42 +08:00
</p>
<div id="is_registed">
<%= render :partial => 'regested', locals: { :isregisted => false} %>
</div>
2015-03-12 18:04:12 +08:00
<%= 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;" %>
2015-03-09 11:31:42 +08:00
<% end %>
</div>
</div>