%= form_with(model: pdfresource, class: "contents") do |form| %>
<% if pdfresource.errors.any? %>
<%= pluralize(pdfresource.errors.count, "error") %> prohibited this pdfresource from being saved:
<% pdfresource.errors.each do |error| %>
- <%= error.full_message %>
<% end %>
<% end %>
<%= form.label :name, class: "font-bold" %>
<%= form.text_field :name, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.label :description, class: "font-bold" %>
<%= form.textarea :description, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
Go to two with the description here. THIS WILL BE RICH TEXT.
<%= form.label :card_description, class: "font-bold" %>
<%= form.textarea :card_description, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
This is a much shorter description that is used inside the "card" boxes on the
listings page.
<%= form.label :pdfs, "Resource PDFs", class: "font-bold" %>
<%= form.file_field :pdfs, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
You can upload up to 10 PDFs per resource. The original files were:
<% pdfresource.pdfs.each do |pdf| %>
<%= pdf.filename %>
<% end %>
<%= form.label :thumbnails, class: "font-bold" %>
<%= form.file_field :thumbnails, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
You can upload up to 10 thumbnails per resource. The original files were:
<% pdfresource.thumbnails.each do |thumbnail| %>
<%= thumbnail.filename %>
<% end.to_sentence %>
<%= form.label :price, class: "font-bold" %>
<%= form.number_field :price, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
This is what we will sell it for!
<%= form.label :stripe_product_id, "Stripe Product ID", class: "font-bold" %>
<%= form.text_field :stripe_product_id, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.label :age_range, class: "font-bold" %>
<%= form.text_field :age_range, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.label :curriculum, class: "font-bold" %>
<%= form.text_field :curriculum, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.label :feature_slot, class: "font-bold" %>
<%= form.number_field :feature_slot, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
<% end %>