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

142 lines
4.5 KiB
Plaintext
Raw Normal View History

<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>
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").text("<%= l(:label_input_email_blank)%>");
return false;
}
else if(!filter.test(email))
{
$("#valid_email").text("<%= l(:label_email_format_error)%>");
return false;
}
else if(email.length > 25)
{
$("#valid_email").text("邮箱名过长,最长为25个字符");
return false;
2015-03-12 18:04:12 +08:00
}
else
{
$("#valid_email").text("");
return true;
2015-03-12 17:48:31 +08:00
}
}
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>
2015-04-09 10:25:46 +08:00
<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>
<ul>
<li>
<%= 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);" %>
</li>
</ul>
<div class="cl"></div>
<a href="#" class="btn_free" onclick="senderEmail($(this));">
<%= l(:label_send_email)%>
</a>
<% end %>
<%# 邀请用户的状态 %>
<% unless @inviter_lists.blank? %>
<div class="section">
<div class="section-header">
2015-09-18 15:57:29 +08:00
<div class="desc">项目成员邀请状态列表</div>
</div>
<div class="invitations-records">
<% @inviter_lists.each do |inviter_list| %>
<table>
<tbody>
2015-09-17 14:37:45 +08:00
<% if inviter_list.user != nil %>
<tr>
<td class="email"><%= inviter_list.user.mail %></td>
<td class="text-name">
<% if inviter_list.user.active? %>
<%=link_to inviter_list.user.name, user_path(inviter_list.user), :class => "c_eblue" %>
<% else %>
<span class="unactive"><%= inviter_list.user.name %></span>
<% end %>
</td>
<td class="text-status"><%= status_for_ivitied(inviter_list, @project) %></td>
<!--<td class="text-time"><%#= time_tag(inviter_list.created_at).html_safe %></td>-->
</tr>
2015-09-17 14:37:45 +08:00
<% end %>
</tbody>
</table>
<% end %>
</div>
</div>
<% end %>
<% unless @inviter_lists.blank? %>
2015-06-05 14:24:50 +08:00
<div>
<% unless @inviters_count.nil? %>
<span class="status_inviter">已加入项目的用户</span><br/>
<% @inviters.each do |inv| %>
<%= inv.name unless inv.nil? %><br/>
<% end %>
2015-06-05 14:24:50 +08:00
<% end %>
</br>
<% unless @waiters_count.nil? %>
<span class="status_inviter">等待加入项目的用户</span><br/>
<% @waiters.each do |wai| %>
<%= wai.name unless wai.nil?%><br/>
<% end %>
2015-06-05 14:24:50 +08:00
<% end %>
</div>
<% end %>
</div>
2015-04-09 10:25:46 +08:00
2015-06-03 18:11:52 +08:00