From 1062c6328f60bf9cacba20c07f5cd33e55c153ee Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 14 Nov 2024 11:12:36 +0000 Subject: Adds credits to resource and required asterisks on form --- app/views/pdfresources/_form.html.erb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/pdfresources/_form.html.erb b/app/views/pdfresources/_form.html.erb index 0739bc9..8b439b0 100644 --- a/app/views/pdfresources/_form.html.erb +++ b/app/views/pdfresources/_form.html.erb @@ -12,25 +12,25 @@ <% end %>
- <%= form.label :name, class: "font-bold" %> + <%= required_label_tag(form, :name) %> <%= 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" %> + <%= required_label_tag(form, :description) %> <%= 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" %> + <%= required_label_tag(form, :card_description) %> <%= 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" %> + <%= required_label_tag(form, :pdfs) %> <%= 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:

- <%= form.label :thumbnails, class: "font-bold" %> + <%= required_label_tag(form, :thumbnails) %> <%= 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:

+
+ <%= required_label_tag(form, :credits) %> + <%= form.number_field :credits, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %> +

Number of credits required to purchase this resource.

+
+ +
<%= 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" %> -- cgit v1.2.3