<%= render_breadcrumbs builder: Sufia::BootstrapBreadcrumbsBuilder %>

Batch Edit Descriptions    Click on labels below to edit file descriptions.

Changes will be applied to: (<%= @names.size %> files)

<%= @names.join(", ").html_safe %>

Descriptions:

<% @terms.each do |term| %> <% vals = @show_file.send(term) %>
<%= form_for @generic_file, url: batch_edits_path, method: :put, remote: true, html: { id: "form_#{term.to_s}", class: "ajax-form"} do |f| %> <%= hidden_field_tag('update_type', 'update') %> <%= hidden_field_tag('key', term.to_s) %> <%= render partial: "generic_files/field_form", locals: { generic_file: @show_file, f: f, render_req: false, key: term } %>
<%= f.submit "Save changes", class: 'btn btn-primary field-save updates-batches' , id: "#{term.to_s}_save" %> Cancel
<% end %>
<% end %>
<%= form_for @generic_file, url: batch_edits_path, method: :put, remote: true, html: { id: "form_permissions", class: "ajax-form"} do |f| %> <%= hidden_field_tag('update_type', 'update') %> <%= hidden_field_tag('key', 'permissions') %> <%= render partial: "generic_files/permission_form", locals: { gf: @show_file } %>
<%= f.submit "Save changes", class: 'btn btn-primary updates-batches', id: 'permissions_save' %> Cancel
<% end %>
<%= button_to "Clear Batch", { controller: :batch_edits, action: :clear }, form_class: 'hidden', remote: true, id: 'clear_batch' %>