summaryrefslogtreecommitdiffstats
path: root/app/views/members/create.js.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/members/create.js.erb')
-rw-r--r--app/views/members/create.js.erb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/members/create.js.erb b/app/views/members/create.js.erb
index 11c468a76..d716743ef 100644
--- a/app/views/members/create.js.erb
+++ b/app/views/members/create.js.erb
@@ -2,10 +2,11 @@ $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projec
hideOnLoad();
<% if @members.present? && @members.all? {|m| m.valid? } %>
+ hideModal();
<% @members.each do |member| %>
$("#member-<%= member.id %>").effect("highlight");
<% end %>
-<% else %>
+<% elsif @members.present? %>
<% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %>
alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors))) %>');
<% end %>