<%= t('.add_participants') %>

<%= t('.instructions') %>

<% access_options = options_for_select([['Manager', Hyrax::CollectionTypeParticipant::MANAGE_ACCESS], ['Creator', Hyrax::CollectionTypeParticipant::CREATE_ACCESS]]) %> <% unless @collection_type_participant.nil? %>
<%= simple_form_for @collection_type_participant, url: hyrax.admin_collection_type_participants_path, html: { id: 'group-participants-form' }, as: :collection_type_participant do |f| %>
<%= f.hidden_field :hyrax_collection_type_id, value: @collection_type_participant.hyrax_collection_type_id %> <%= f.hidden_field :agent_type, value: Hyrax::CollectionTypeParticipant::GROUP_TYPE %> <%= f.text_field :agent_id, placeholder: "Search for a group...", class: 'form-control' %> as <%= f.select :access, access_options, { prompt: "Select a role..." }, class: 'form-control' %> <%= f.submit t('.submit'), class: 'btn btn-info', :disabled => true %>
<% end %>
<%= simple_form_for @collection_type_participant, url: hyrax.admin_collection_type_participants_path, html: { id: 'user-participants-form' }, as: :collection_type_participant do |f| %>
<%= f.hidden_field :hyrax_collection_type_id, value: @collection_type_participant.hyrax_collection_type_id %> <%= f.hidden_field :agent_type, value: Hyrax::CollectionTypeParticipant::USER_TYPE %> <%= f.text_field :agent_id, placeholder: "Search for a user..." %> as <%= f.select :access, access_options, { prompt: "Select a role..." }, class: 'form-control' %> <%= f.submit t('.submit'), class: 'btn btn-info', :disabled => true %>
<% end %>
<% end %>
<%= t('.current_participants') %> <%= render 'form_participant_table', access: 'managers', filter: :manager? %> <%= render 'form_participant_table', access: 'creators', filter: :creator? %>