Initial commit
This commit is contained in:
18
app/views/shared/_file_infos_dropzone.html.erb
Normal file
18
app/views/shared/_file_infos_dropzone.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="field d-none">
|
||||
<%= form.fields_for :file_infos do |file_info_form| %>
|
||||
<% unless file_info_form.object.persisted? %>
|
||||
<%= file_info_form.hidden_field :filename, value: file_info_form.object.filename %>
|
||||
<%= file_info_form.hidden_field :byte_size, value: file_info_form.object.byte_size %>
|
||||
<%= file_info_form.hidden_field :content_type, value: file_info_form.object.content_type %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="dropzone field border-dashed"
|
||||
data-accepted-files="<%= dropzone_accepted_files_for(releasable) %>"
|
||||
data-behavior="file-info-dropzone"
|
||||
data-input-name-prefix="<%= releasable.model_name.param_key %>[file_infos_attributes]"
|
||||
data-existing-files="<%= mock_file_infos_json(releasable.file_infos) %>"
|
||||
data-placeholder="<%= dropzone_placeholder_message_for(releasable) %>"
|
||||
data-submit-button="#submit_release">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user