@ -1,14 +1,16 @@
<script>
function ismail(mail) {
function verifyAddress(obj) {
var email = document.getElementsByName('mail');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(mail )) return true;
if (email.value==null||filter.test(email.value )) return true;
else {
alert('您的电子邮件格式不正确');
document.getElementById('valid_email').innerHTML= <%= l(:label_email_format_error)%>;
document.getElementById('valid_email').style.color="#FF0000";
return false;}
}
</script>
<div class="project_r_h">
<h2 class="project_h2">邀请加入 </h2>
<h2 class="project_h2"><%= l(:label_invite_join)%> </h2>
</div>
<div class="floatbox" style="margin:130px;">
<div >
@ -16,18 +18,18 @@
</div>
<div class="cl"></div>
<div class="box_main">
<h3 class="box_h3">发送邮件邀请新用户 </h3>
<h3 class="box_h3"><%= l(:label_invite_new_user)%> </h3>
<p class="box_p">
输入好友邮箱地址, Trustie会自动为该邮箱注册用户!
<%= 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',:remote=>true) do %>
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" % >
<p><span id="valid_email"></span></span><%= text_field_tag 'mail', l(:label_email), :class => "fb_item fl" %></p >
<div class="cl"></div>
<div class="cl"></div>
<%= submit_tag '免费发送' , :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
<%= submit_tag l(:label_send_email_free), :onclick => "verifyAddress(this);" , :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
<% end %>
</div>
</div>