|
|
|
@ -1,16 +1,26 @@
|
|
|
|
|
<script>
|
|
|
|
|
function verifyAddress(obj) {
|
|
|
|
|
var email = document.getElementsByName('mail');
|
|
|
|
|
function verifyAddress() {
|
|
|
|
|
var email = $('#mail').val();
|
|
|
|
|
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
|
|
|
|
if (filter.test(email.value)&& !(email.value == null)) return true;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
document.getElementById('valid_email').innerHTML = "您所填写的电子邮件格式不正确";
|
|
|
|
|
document.getElementById('valid_email').style.color = "#FF0000";
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (email == "" || filter.test(email)) {
|
|
|
|
|
$("#valid_email").html("");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$("#valid_email").html("您所填写的电子邮件格式不正确");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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">邀请加入</h2>
|
|
|
|
@ -28,8 +38,9 @@
|
|
|
|
|
<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", :placeholder => l(:label_input_email) %>
|
|
|
|
|
<%= 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), :onblur => "verifyAddress();" %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<a href="#" class="btn_free" onclick="$(this).parent().submit();">
|
|
|
|
|