demarches-normaliennes/app/views/shared/attachment/_update.html.haml
2019-05-21 14:21:13 +02:00

12 lines
591 B
Text

.piece-justificative
- if pj.attached?
.piece-justificative-actions{ id: "piece_justificative_#{object.id}" }
.piece-justificative-action
= render partial: "shared/attachment/show", locals: { attachment: pj.attachment, user_can_upload: true }
.piece-justificative-action
= button_tag 'Remplacer', type: 'button', class: 'button small', data: { 'toggle-target': "#champs_#{object.id}" }
= form.file_field :piece_justificative_file,
id: "champs_#{object.id}",
class: "piece-justificative-input #{'hidden' if pj.attached?}",
direct_upload: true