dawarich/app/views/imports/_form.html.erb

26 lines
955 B
Text
Raw Normal View History

<%= form_with model: import, class: "contents", data: {
controller: "direct-upload",
direct_upload_url_value: rails_direct_uploads_url,
direct_upload_user_trial_value: current_user.trial?,
direct_upload_target: "form"
} do |form| %>
2024-03-15 18:27:31 -04:00
<label class="form-control w-full max-w-xs my-5">
<div class="label">
<span class="label-text">Select one or multiple files</span>
2024-03-15 18:27:31 -04:00
</div>
2025-05-03 14:36:09 -04:00
<%= form.file_field :files,
multiple: true,
direct_upload: true,
2025-05-03 14:36:09 -04:00
class: "file-input file-input-bordered w-full max-w-xs",
data: { direct_upload_target: "input" } %>
<div class="text-sm text-gray-500 mt-2">
Files will be uploaded directly to storage. Please be patient during upload.
</div>
2024-03-15 18:27:31 -04:00
</label>
<div class="inline">
2025-05-03 14:36:09 -04:00
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer",
data: { direct_upload_target: "submit" } %>
2024-03-15 18:27:31 -04:00
</div>
<% end %>