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

<% if @members.present? && @members.all? {|m| m.valid? } %>
  <% @members.each do |member| %>
    new Effect.Highlight("member-<%= member.id %>");
  <% end %>
<% else %>
  <% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %>
  alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => errors) %>');
<% end %>