diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 19:46:59 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 19:46:59 +0200 |
| commit | 7ebb5ce8ef276e6d23d818c216be6ef2974369cc (patch) | |
| tree | 75ec93871392c94e10c2627327efd5994f324de0 /app/views/assets/edit.html.erb | |
| parent | cef5d1a685f324a4779ea6d18da0b0bbf6cfb7b1 (diff) | |
Turn the asset upload forms into file drop targets
Dropped files land in the existing file input and submit through the
unchanged form. An empty name field is prefilled from the basename.
Diffstat (limited to 'app/views/assets/edit.html.erb')
| -rw-r--r-- | app/views/assets/edit.html.erb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/assets/edit.html.erb b/app/views/assets/edit.html.erb index 0c1dd8fe..d0a39aa3 100644 --- a/app/views/assets/edit.html.erb +++ b/app/views/assets/edit.html.erb | |||
| @@ -14,7 +14,12 @@ | |||
| 14 | <% end %> | 14 | <% end %> |
| 15 | 15 | ||
| 16 | <div class="node_description"><%= f.label :upload, "Replace file" %></div> | 16 | <div class="node_description"><%= f.label :upload, "Replace file" %></div> |
| 17 | <div class="node_content"><%= f.file_field :upload %></div> | 17 | <div class="node_content"> |
| 18 | <div id="asset_dropzone"> | ||
| 19 | <%= f.file_field :upload %> | ||
| 20 | <p class="field_hint">…or drop a file here.</p> | ||
| 21 | </div> | ||
| 22 | </div> | ||
| 18 | 23 | ||
| 19 | <div class="node_description"><%= f.label :creator %></div> | 24 | <div class="node_description"><%= f.label :creator %></div> |
| 20 | <div class="node_content"><%= f.text_field :creator %></div> | 25 | <div class="node_content"><%= f.text_field :creator %></div> |
