docbrown/app/views/admin/shared/_image_uploader.html.erb
Rajat Talesra 93f73636c7
Post bootstrap changes - remove headings from admin.scss (#19019)
* h1 and h2 design fixes

* h2 redesign fixes

* Removed incorrect code

* Revert incorrect test code

* h3 heading redesign

* h4,h4,h5 headings redesign

* Minor design fixes

* Fixed all heading styles

* Test case fix

* Revert incorrect if condition

* Revert incorrect if condition

* Removed non required div
2023-02-02 15:52:35 +05:30

16 lines
817 B
Text

<div class="crayons-card p-6" data-controller="image-upload" data-image-upload-url-value="<%= image_uploads_path %>">
<h2 class="crayons-subtitle-1 mb-4">Upload an Image</h2>
<p class="mb-6">Quickly upload an image.</p>
<%# Multipart, remote forms are tricky, the data is actually sent in the Stimulus controller. %>
<%= form_with(url: image_uploads_path, multipart: true) do |f| %>
<div class="crayons-field">
<%= label_tag :image, "Image:", class: "crayons-field__label" %>
<%= f.file_field :image, required: true, accept: "image/*", data: { "image-upload-target": "fileField" } %>
</div>
<%= f.submit "Upload", class: "crayons-btn mt-4", data: { action: "image-upload#onFormSubmit" } %>
<% end %>
<div class="mt-4 hidden" data-image-upload-target="imageResult">
</div>
</div>