attachment: disable Delete button during request
Prevent users from clicking the Delete button more than once.
This commit is contained in:
parent
1fcb3c4ff2
commit
d25e173f11
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
||||||
= render partial: "shared/attachment/show", locals: { attachment: attachment, user_can_upload: true }
|
= render partial: "shared/attachment/show", locals: { attachment: attachment, user_can_upload: true }
|
||||||
- if user_can_destroy
|
- if user_can_destroy
|
||||||
.attachment-action
|
.attachment-action
|
||||||
= link_to 'Supprimer', attachment_url(attachment.id, { signed_id: attachment.blob.signed_id }), remote: true, method: :delete, class: 'button small danger'
|
= link_to 'Supprimer', attachment_url(attachment.id, { signed_id: attachment.blob.signed_id }), remote: true, method: :delete, class: 'button small danger', data: { disable: true }
|
||||||
.attachment-action
|
.attachment-action
|
||||||
= button_tag 'Remplacer', type: 'button', class: 'button small', data: { 'toggle-target': ".attachment-input-#{attachment_id}" }
|
= button_tag 'Remplacer', type: 'button', class: 'button small', data: { 'toggle-target': ".attachment-input-#{attachment_id}" }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue