<%= if @group[:id] link_to_remote _('btn_x'), :url => group_path(@group), :method => :get else link_to_function _('btn_x'), "['add_group', 'add_group_form'].each(Element.toggle);" end %>
<%= error_messages_for(:group, :object => @group) %>
<% if @group[:id] %> <%= form_remote_tag(:url=> group_path(@group)) %> <%= hidden_field('group', 'id') %> <% else %> <%= form_remote_tag(:url=> groups_path) %> <% end %> <% if !@group.new_record? -%> <% end -%>
<%= _('name')%> <%= text_field('group', 'name', :size=>15 ) %>
<%= _('users')%> <%= @users.inject([]) do |list, u| unless u.is_anon? if (@group[:id] == visitor.site.public_group_id) || (@group[:id] == visitor.site.site_group_id) list << "#{u.login}" else list << "#{u.login}" end end list end.join(' ') %>
<%= _('replace by') %><%= select('group', 'replace_by', @groups.map{|g| [g[:name], g[:id]]} , {:include_blank => true}) %>
<%= _('auto_publish') %> /> <%= _('auto_publish') %>
'/>
<% if !@group.new_record? && @group.can_destroy? -%> <%= form_remote_tag(:url => group_path(@group), :confirm => _('Are you sure you want to destroy this group ?') ) %>

<%= _('destroy group') %> '>

<% end -%>