working on image feature
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<%= turbo_frame_tag dom_id(entry, :images) do %>
|
||||
<%= form_with url: upload_path, scope: entry.model_name.param_key, multipart: true, class: "entry-image-form" do |form| %>
|
||||
<% if entry.errors[:images].any? || entry.errors[:base].any? %>
|
||||
<div class="form-errors form-errors--compact">
|
||||
<ul>
|
||||
<% entry.errors[:base].each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
|
||||
<% entry.errors[:images].each do |message| %>
|
||||
<li>Images <%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= form.label :images, "Images" %>
|
||||
<%= form.file_field :images, multiple: true, accept: "image/jpeg,image/png", required: true %>
|
||||
</div>
|
||||
|
||||
<div class="action-row">
|
||||
<%= form.submit "Upload images", class: "button button--primary button--small" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user