dossier: make the upload label a real label
This commit is contained in:
parent
1de3674e36
commit
f895570b00
4 changed files with 11 additions and 12 deletions
|
@ -1,3 +1,3 @@
|
|||
<%= render_flash(timeout: 5000, sticky: true) %>
|
||||
<%= remove_element("#attachment_#{@attachment_id}") %>
|
||||
<%= show_element("#attachment_file_#{@attachment_id}") %>
|
||||
<%= remove_element(".attachment-actions-#{@attachment_id}") %>
|
||||
<%= show_element(".attachment-input-#{@attachment_id}") %>
|
||||
|
|
|
@ -13,17 +13,16 @@
|
|||
= link_to('le modèle suivant', url_for(template), target: '_blank', rel: 'noopener')
|
||||
|
||||
- if persisted
|
||||
.attachment-actions{ id: "attachment_#{attachment_id}" }
|
||||
.attachment-actions{ class: "attachment-actions-#{attachment_id}" }
|
||||
.attachment-action
|
||||
= render partial: "shared/attachment/show", locals: { attachment: attachment, user_can_upload: true }
|
||||
- if user_can_destroy
|
||||
.attachment-action
|
||||
= link_to 'Supprimer', attachment_url(attachment.id, { signed_id: attachment.blob.signed_id }), remote: true, method: :delete, class: 'button small danger'
|
||||
.attachment-action
|
||||
= button_tag 'Remplacer', type: 'button', class: 'button small', data: { 'toggle-target': "#attachment_file_#{attachment_id}" }
|
||||
= button_tag 'Remplacer', type: 'button', class: 'button small', data: { 'toggle-target': ".attachment-input-#{attachment_id}" }
|
||||
|
||||
= form.file_field attached_file.name,
|
||||
id: "attachment_file_#{attachment_id}",
|
||||
class: "attachment-input #{'hidden' if persisted}",
|
||||
class: "attachment-input attachment-input-#{attachment_id} #{'hidden' if persisted}",
|
||||
accept: accept,
|
||||
direct_upload: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue