Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/views/sufia/batch_uploads/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<%= simple_form_for [sufia, @form], html: { multipart: true } do |f| %>
<%= simple_form_for [sufia, @form],
html: {
data: { behavior: 'work-form' },
multipart: true
} do |f| %>
<% content_for :files_tab do %>
<p class="switch-upload-type">To create a single work for all the files, go to <%= link_to "New Work", [:new, Sufia.primary_work_type.model_name.singular_route_key] %></p>
<p class="instructions"><%= t("sufia.batch_uploads.files.instructions") %></p>
Expand Down
1 change: 1 addition & 0 deletions spec/views/sufia/batch_uploads/_form.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

it "draws the page" do
expect(page).to have_selector("form[action='/batch_uploads']")
expect(page).to have_selector("form[action='/batch_uploads'][data-behavior='work-form']")
# No title, because it's captured per file (e.g. Display label)
expect(page).not_to have_selector("input#generic_work_title")
expect(view.content_for(:files_tab)).to have_link("New Work", href: "/concern/generic_works/new")
Expand Down