<% #-- # Copyright (C) 2009 Johan Sørensen # Copyright (C) 2009 Tor Arne Vestbø # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #++ %> <%= breadcrumbs_from(@root) -%>

<%= t("views.memberships.new_title", :group_memberships => link_to(h(@group.name), [@group, :memberships])) -%>

<%= error_messages_for :group, :membership -%> <% form_for [@group, @membership] do |f| -%>

<%= f.label :login, t("views.users.username") -%>
<%= text_field :user, :login, :id => "user_login_autocomplete" -%>

<%= f.label :role, t("views.memberships.role") -%> <%= f.select :role_id, Role.all.map{|r| [r.name, r.id]} -%>

<%= f.submit -%> <% end -%>