82 lines
2.9 KiB
Plaintext
82 lines
2.9 KiB
Plaintext
<script type="text/javascript" src="/javascripts/jQuery.autoMail.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$("#mail").mailAutoComplete({
|
|
boxClass: "out_box", //外部box样式
|
|
listClass: "list_box", //默认的列表样式
|
|
focusClass: "focus_box", //列表选样式中
|
|
markCalss: "mark_box", //高亮样式
|
|
autoClass: false,
|
|
textHint: true //提示文字自动隐藏
|
|
});
|
|
});
|
|
</script>
|
|
<style type="text/css">
|
|
.out_box{border:1px solid #ccc; background:#fff; font:12px/20px Tahoma;}
|
|
.list_box{border-bottom:1px solid #eee; padding:0 5px; cursor:pointer;}
|
|
.focus_box{background:#83DAF6;}
|
|
.mark_box{color:#FF7143;}
|
|
</style>
|
|
<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").text("<%= l(:label_input_email_blank)%>");
|
|
}
|
|
else if (filter.test(email)) {
|
|
$("#valid_email").html("");
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
$("#valid_email").text("<%= l(:label_email_format_error)%>");
|
|
}
|
|
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="box_main">
|
|
<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>
|
|
<div class="lin1_2">
|
|
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
|
|
</div>
|
|
<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> |