修改邮箱邀请时,邮件为空时提示错误
This commit is contained in:
parent
69eecf49d1
commit
0ba7ef0560
|
@ -334,8 +334,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_mail_to_member
|
def send_mail_to_member
|
||||||
|
if !params[:mail].blank? && User.find_by_mail(params[:mail].to_s).nil?
|
||||||
if !params[:mail].nil? && User.find_by_mail(params[:mail].to_s).nil?
|
|
||||||
email = params[:mail]
|
email = params[:mail]
|
||||||
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
||||||
@is_zhuce =false
|
@is_zhuce =false
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
<script>
|
||||||
|
function ismail(mail) {
|
||||||
|
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||||
|
if (filter.test(mail)) return true;
|
||||||
|
else {
|
||||||
|
alert('您的电子邮件格式不正确');
|
||||||
|
return false;}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2">邀请加入</h2>
|
<h2 class="project_h2">邀请加入</h2>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +18,7 @@
|
||||||
<div class="box_main">
|
<div class="box_main">
|
||||||
<h3 class="box_h3">发送邮件邀请新用户</h3>
|
<h3 class="box_h3">发送邮件邀请新用户</h3>
|
||||||
<p class="box_p">
|
<p class="box_p">
|
||||||
输入好友邮箱地址,Trustie帮您免费发送!
|
输入好友邮箱地址,Trustie会自动为该邮箱注册用户!
|
||||||
</p>
|
</p>
|
||||||
<div id="is_registed">
|
<div id="is_registed">
|
||||||
<%= render :partial => 'regested', locals: { :isregisted => false} %>
|
<%= render :partial => 'regested', locals: { :isregisted => false} %>
|
||||||
|
|
|
@ -181,7 +181,7 @@ zh:
|
||||||
notice_successful_create: 创建成功
|
notice_successful_create: 创建成功
|
||||||
notice_successful_update: 更新成功
|
notice_successful_update: 更新成功
|
||||||
notice_successful_delete: 删除成功
|
notice_successful_delete: 删除成功
|
||||||
notice_registed_success: 该邮箱已被注册,请直接邀请注册用户
|
notice_registed_success: 您输入的邮箱为空或者该邮箱已被注册!
|
||||||
notice_failed_delete: 删除失败
|
notice_failed_delete: 删除失败
|
||||||
notice_successful_connection: 连接成功
|
notice_successful_connection: 连接成功
|
||||||
notice_successful_join: 加入成功
|
notice_successful_join: 加入成功
|
||||||
|
|
Loading…
Reference in New Issue