summaryrefslogtreecommitdiffstats
path: root/app/views/members/create.js.erb
blob: d716743ef26e998117422802b02848d1ca3f2372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
hideOnLoad();

<% if @members.present? && @members.all? {|m| m.valid? } %>
  hideModal();
  <% @members.each do |member| %>
    $("#member-<%= member.id %>").effect("highlight");
  <% end %>
<% 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 %>