Sha256: 6f232fd32e672a3374521bbc5ca687627e7ef3cd40beae205833f38e1c6d1451

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

<% fieldset_class  ||= '' %>
<% select_label_id ||= '' %>

<%= form_tag collections.collections_path, method: :put do %>
  <fieldset class="required <%= fieldset_class %>">
    <%= hidden_field_tag 'collection[members]', 'add' %>
    <%= hidden_field_tag 'batch_document_ids[]', collectible.id %>

    <div class="form-group collection_id">
      <div class="controls">
        <% options = "" %>
        <% collections = available_collections(collectible) %>
        <% if collections.any? -%>
          <% options << '<optgroup label="Your Collections">'.html_safe %>
          <% options << options_from_collection_for_select(collections, "pid", "title") %>
          <% options << '</optgroup>'.html_safe %>
        <% end %>
        <%= select_tag :id, options, prompt: 'Make a Selection', class: 'form-control', :'aria-labelledby' => select_label_id %>
      </div>
    </div>

  </fieldset>
  <div class="form-actions with-side-padding with-footroom">
    <%= submit_tag "Add to collection", class: 'btn btn-primary' %>
    <%= link_to 'Cancel', root_path, class: 'btn btn-default', data: { dismiss: 'modal' } %>
  </div>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
worthwhile-0.1.1 app/views/curate/collections/_form_to_add_member.html.erb
worthwhile-0.1.0 app/views/curate/collections/_form_to_add_member.html.erb
worthwhile-0.0.3 app/views/curate/collections/_form_to_add_member.html.erb
worthwhile-0.0.2 app/views/curate/collections/_form_to_add_member.html.erb
worthwhile-0.0.1 app/views/curate/collections/_form_to_add_member.html.erb