Add path field to procedure information form
This commit is contained in:
parent
f6a6d8f457
commit
f94a24d7ce
12 changed files with 176 additions and 32 deletions
|
@ -11,6 +11,14 @@
|
|||
= f.text_area :description, rows: '6', placeholder: 'Description du projet', class: 'form-control'
|
||||
|
||||
- if !@procedure.locked?
|
||||
- if Flipflop.publish_draft?
|
||||
.form-group
|
||||
%h4 Lien*
|
||||
= f.text_field :path, value: @path, class: 'form-control', data: { remote: true, debounce: true, url: admin_procedures_available_path, params: { id: @procedure.id }.to_query(:procedure) }
|
||||
.unavailable-path-message
|
||||
- if !@available
|
||||
= render partial: 'unavailable', locals: { mine: @mine }
|
||||
|
||||
.form-group
|
||||
%h4 Conservation des données
|
||||
= f.label :duree_conservation_dossiers_dans_ds, "Sur demarches-simplifiees.fr* (durée en mois après le début de l’instruction)"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
%h4 Lien de la démarche
|
||||
%p.center
|
||||
= commencer_url(procedure_path: '')
|
||||
= text_field_tag('procedure_path', @procedure.default_path,
|
||||
= text_field_tag('procedure_path', @procedure.path || @procedure.default_path,
|
||||
id: 'procedure_path',
|
||||
placeholder: 'Chemin vers la démarche',
|
||||
data: { autocomplete: 'path' },
|
||||
|
|
|
@ -3,4 +3,7 @@
|
|||
= 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.button 'Enregistrer', class: 'btn btn-success'
|
||||
- if !Flipflop.publish_draft? || (@available || @mine)
|
||||
= f.button 'Enregistrer', class: 'btn btn-success'
|
||||
- else
|
||||
= f.button 'Enregistrer', class: 'btn btn-success', disabled: true
|
||||
|
|
|
@ -5,4 +5,8 @@
|
|||
#procedure_new.section.section-label
|
||||
= form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
|
||||
= render partial: 'informations', locals: { f: f }
|
||||
= f.submit 'Valider', class: 'btn btn-info', id: 'save-procedure', style: 'float: right;'
|
||||
.text-right
|
||||
- if !Flipflop.publish_draft? || (@available || @mine)
|
||||
= f.button 'Valider', class: 'btn btn-info', id: 'save-procedure'
|
||||
- else
|
||||
= f.button 'Valider', class: 'btn btn-info', id: 'save-procedure', disabled: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue