Initial commit
This commit is contained in:
17
app/views/shared/_photos_dropzone_fields.html.erb
Normal file
17
app/views/shared/_photos_dropzone_fields.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="field d-none">
|
||||
<%= form.label :photos %>
|
||||
<%= form.file_field :photos, disable: true, direct_upload: true, multiple: true, id: "release_photos", hide_label: true %>
|
||||
<% release.photos.each do |photo| %>
|
||||
<% unless photo.persisted? %>
|
||||
<%= hidden_field_tag "#{release.model_name.param_key}[photos][]", photo.signed_id %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="dropzone field border-dashed"
|
||||
data-accepted-files="<%= dropzone_accepted_files_for(release) %>"
|
||||
data-behavior="dropzone"
|
||||
data-file-input-id="release_photos"
|
||||
data-existing-files="<%= mock_photos_json(release.photos) %>"
|
||||
data-placeholder="<%= dropzone_placeholder_message_for(release) %>"
|
||||
data-submit-button="#submit_release">
|
||||
</div>
|
||||
Reference in New Issue
Block a user