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/new.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/new.html.erb')
| -rw-r--r-- | app/views/assets/new.html.erb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/assets/new.html.erb b/app/views/assets/new.html.erb index 7bded949..8a7a6094 100644 --- a/app/views/assets/new.html.erb +++ b/app/views/assets/new.html.erb | |||
| @@ -9,7 +9,12 @@ | |||
| 9 | <div class="node_content"><%= f.text_field :name %></div> | 9 | <div class="node_content"><%= f.text_field :name %></div> |
| 10 | 10 | ||
| 11 | <div class="node_description"><%= f.label :upload, "File" %></div> | 11 | <div class="node_description"><%= f.label :upload, "File" %></div> |
| 12 | <div class="node_content"><%= f.file_field :upload %></div> | 12 | <div class="node_content"> |
| 13 | <div id="asset_dropzone"> | ||
| 14 | <%= f.file_field :upload %> | ||
| 15 | <p class="field_hint">…or drop a file here.</p> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 13 | 18 | ||
| 14 | <div class="node_description"><%= f.label :creator %></div> | 19 | <div class="node_description"><%= f.label :creator %></div> |
| 15 | <div class="node_content"><%= f.text_field :creator %></div> | 20 | <div class="node_content"><%= f.text_field :creator %></div> |
