[fix #675] upload notice in DS

This commit is contained in:
simon lehericey 2018-04-11 14:35:52 +02:00
parent d06b72fb80
commit 5667cfe747
7 changed files with 32 additions and 7 deletions

View file

@ -2,7 +2,7 @@
.alert.alert-info
Cette procédure est publiée, certains éléments de la description ne sont plus modifiables
- { libelle: 'Libellé*', description: 'Description*', organisation: 'Organisme*', direction: 'Direction', lien_site_web: 'Lien site internet', lien_notice: 'Lien notice', web_hook_url: 'Lien de rappel HTTP' }.each do |key, value|
- { libelle: 'Libellé*', description: 'Description*', organisation: 'Organisme*', direction: 'Direction', lien_site_web: 'Lien site internet', web_hook_url: 'Lien de rappel HTTP' }.each do |key, value|
- if key != :web_hook_url || current_administrateur&.feature_enabled?(:web_hook_allowed)
.form-group
%h4
@ -16,6 +16,20 @@
- else
= f.text_field key, class: 'form-control', placeholder: value
.form-group
%h4 Notice explicative de la procédure
- notice = @procedure.notice
- if !notice.attached?
= f.file_field :notice,
direct_upload: true
- else
%a{ href: url_for(notice), target: '_blank' }
= notice.filename.to_s
%br
Modifier :
= f.file_field :notice,
direct_upload: true
.row
.col-md-6
%h4 Logo de la procédure

View file

@ -3,4 +3,4 @@
= form_for @procedure, url: url_for({ controller: 'admin/procedures', action: :update, id: @procedure.id }), multipart: true do |f|
= render partial: 'informations', locals: { f: f }
.text-right
= f.submit 'Enregistrer', class: 'btn btn-success'
= f.button 'Enregistrer', class: 'btn btn-success'