Merge pull request #2850 from betagouv/fix-2847

Corrige les erreurs lors de la création d'une démarche avec un logo
This commit is contained in:
gregoirenovel 2018-10-17 10:01:31 +02:00 committed by GitHub
commit f1924d22e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,8 +59,8 @@
- else - else
%a{ href: url_for(deliberation), target: '_blank' } %a{ href: url_for(deliberation), target: '_blank' }
= deliberation.filename.to_s = deliberation.filename.to_s
= link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure), - if @procedure.persisted?
method: :delete = link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure), method: :delete
%br %br
Modifier : Modifier :
= f.file_field :deliberation, = f.file_field :deliberation,
@ -75,9 +75,9 @@
- else - else
%a{ href: url_for(notice), target: '_blank' } %a{ href: url_for(notice), target: '_blank' }
= notice.filename.to_s = notice.filename.to_s
- if @procedure.persisted?
\- \-
= link_to 'supprimer', delete_notice_admin_procedure_path(@procedure), = link_to 'supprimer', delete_notice_admin_procedure_path(@procedure), method: :delete
method: :delete
%br %br
Modifier : Modifier :
= f.file_field :notice, = f.file_field :notice,
@ -89,8 +89,9 @@
- if @procedure.logo.present? - if @procedure.logo.present?
= image_tag @procedure.decorate.logo_img, { style: 'height: 40px; display: inline; margin-right: 6px;', id: 'preview_procedure_logo' } = image_tag @procedure.decorate.logo_img, { style: 'height: 40px; display: inline; margin-right: 6px;', id: 'preview_procedure_logo' }
\- \-
= link_to 'supprimer', delete_logo_admin_procedure_path(@procedure),
method: :delete - if @procedure.persisted?
= link_to 'supprimer', delete_logo_admin_procedure_path(@procedure), method: :delete
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display: inline' = f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display: inline'
%div{ style: 'margin-top: 5px;' } %div{ style: 'margin-top: 5px;' }