2015-08-31 09:50:54 +02:00
|
|
|
.container#description_page
|
2016-03-02 15:21:45 +01:00
|
|
|
%h2
|
|
|
|
= @dossier.procedure.libelle
|
|
|
|
%h3 Votre dossier
|
|
|
|
|
2015-08-18 10:43:36 +02:00
|
|
|
%br
|
2015-08-10 11:05:06 +02:00
|
|
|
|
2015-11-04 11:14:07 +01:00
|
|
|
-#TODO use form_for
|
2015-08-18 10:43:36 +02:00
|
|
|
= form_tag(url_for({controller: :description, action: :create, dossier_id: @dossier.id}), class: 'form-inline', method: 'POST', multipart: true) do
|
|
|
|
%div
|
|
|
|
.row
|
|
|
|
.col-md-12
|
2016-03-02 15:21:45 +01:00
|
|
|
%h4 Libellé pour votre dossier *
|
2015-08-18 10:43:36 +02:00
|
|
|
= text_field_tag :nom_projet, @dossier.nom_projet, placeholder: 'Nom du projet', class: 'form-control'
|
|
|
|
%br
|
|
|
|
.row
|
|
|
|
.col-md-12
|
2016-03-02 15:21:45 +01:00
|
|
|
%h4 Description *
|
2016-02-18 11:56:54 +01:00
|
|
|
= text_area_tag :description, @dossier.description, rows: '6', placeholder: 'Description du projet', class: 'form-control wysihtml5'
|
2015-11-03 15:27:49 +01:00
|
|
|
|
2015-11-04 11:14:07 +01:00
|
|
|
#liste_champs
|
2015-11-03 16:52:58 +01:00
|
|
|
-unless @champs.nil?
|
|
|
|
-@champs.each do |champ|
|
2015-11-04 11:14:07 +01:00
|
|
|
.row
|
2015-11-17 10:23:05 +01:00
|
|
|
%div{class: "type_champ-#{champ.type_champ}"}
|
2016-02-18 15:36:09 +01:00
|
|
|
-if champ.type_champ == 'checkbox'
|
|
|
|
%h4{style:'margin-left:15px;'}
|
|
|
|
= champ.libelle
|
2016-03-15 17:17:56 +01:00
|
|
|
- if champ.mandatory?
|
|
|
|
= '*'
|
2016-02-18 15:36:09 +01:00
|
|
|
%input{type: 'hidden', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", value: ''}
|
|
|
|
%input{type: 'checkbox', style:'margin-left: 15px;', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", checked: ('checked' if champ.value == 'on')}
|
2015-11-04 11:14:07 +01:00
|
|
|
-else
|
2016-02-18 15:36:09 +01:00
|
|
|
%h4
|
|
|
|
= champ.libelle
|
2016-03-15 17:17:56 +01:00
|
|
|
- if champ.mandatory?
|
|
|
|
= '*'
|
2016-02-18 15:36:09 +01:00
|
|
|
|
|
|
|
-if champ.type_champ == 'textarea'
|
|
|
|
%textarea.form-control{name:"champs['#{champ.id}']",
|
|
|
|
placeholder: champ.libelle,
|
|
|
|
id: "champs_#{champ.id}"}
|
|
|
|
=champ.value
|
|
|
|
-else
|
|
|
|
%input.form-control{name:"champs['#{champ.id}']",
|
|
|
|
placeholder: champ.libelle,
|
|
|
|
id: "champs_#{champ.id}",
|
|
|
|
value: champ.value,
|
|
|
|
type:"#{champ.type_champ}",
|
|
|
|
'data-provide' => ('datepicker' if champ.type_champ == 'datetime'),
|
|
|
|
'data-date-format' => ('dd/mm/yyyy' if champ.type_champ == 'datetime')}
|
2015-11-03 15:27:49 +01:00
|
|
|
|
2016-02-08 19:52:07 +01:00
|
|
|
-if !@procedure.lien_demarche.blank? || @procedure.cerfa_flag || @dossier.pieces_justificatives.size > 1
|
|
|
|
%br
|
|
|
|
%h3 Documents administratifs
|
2015-08-11 15:39:16 +02:00
|
|
|
|
2016-02-08 19:52:07 +01:00
|
|
|
-unless @procedure.lien_demarche.blank?
|
2016-01-08 14:58:22 +01:00
|
|
|
%p
|
|
|
|
Formulaire / documentation de la démarche :
|
|
|
|
%a{style:'font-size:0.9em; padding-left:3px', id: 'lien_cerfa' ,href: "#{@procedure.lien_demarche}", :target => '_blank'} Accéder
|
|
|
|
|
|
|
|
|
2015-08-18 10:43:36 +02:00
|
|
|
%br
|
2015-08-20 12:20:54 +02:00
|
|
|
//TODO a refactorer
|
2015-08-18 10:43:36 +02:00
|
|
|
%table{class:'table', style:'width:55%; margin-left:5%'}
|
2016-02-02 18:37:38 +01:00
|
|
|
- if @procedure.cerfa_flag
|
|
|
|
%tr
|
|
|
|
%th{class:'col-lg-6'}
|
2016-03-15 17:17:56 +01:00
|
|
|
='Formulaire'
|
2015-08-18 10:43:36 +02:00
|
|
|
|
2016-02-02 18:37:38 +01:00
|
|
|
%td{class:'col-lg-5'}
|
|
|
|
-if @dossier.cerfa_available?
|
|
|
|
%span.btn.btn-sm.btn-file.btn-success
|
|
|
|
Modifier
|
2016-03-14 10:22:27 +01:00
|
|
|
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: "application/pdf,
|
|
|
|
application/msword,
|
|
|
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
|
|
|
application/vnd.ms-excel,
|
|
|
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
|
|
|
application/vnd.ms-powerpoint,
|
|
|
|
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
|
|
|
application/vnd.oasis.opendocument.text,
|
|
|
|
application/vnd.oasis.opendocument.presentation,
|
|
|
|
application/vnd.oasis.opendocument.spreadsheet", :max_file_size => 3.megabytes }
|
2016-02-02 18:37:38 +01:00
|
|
|
-else
|
2016-03-14 10:22:27 +01:00
|
|
|
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: "application/pdf,
|
|
|
|
application/msword,
|
|
|
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
|
|
|
application/vnd.ms-excel,
|
|
|
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
|
|
|
application/vnd.ms-powerpoint,
|
|
|
|
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
|
|
|
application/vnd.oasis.opendocument.text,
|
|
|
|
application/vnd.oasis.opendocument.presentation,
|
|
|
|
application/vnd.oasis.opendocument.spreadsheet", :max_file_size => 3.megabytes }
|
2015-08-18 10:43:36 +02:00
|
|
|
|
2015-09-21 17:59:03 +02:00
|
|
|
- @dossier.pieces_justificatives.each do |piece_justificative|
|
2015-08-18 10:43:36 +02:00
|
|
|
%tr
|
2015-08-20 12:20:54 +02:00
|
|
|
%th.col-lg-6
|
2015-09-21 17:59:03 +02:00
|
|
|
= piece_justificative.libelle
|
2015-08-20 12:20:54 +02:00
|
|
|
%td.col-lg-5
|
2015-09-21 17:59:03 +02:00
|
|
|
-if piece_justificative.api_entreprise
|
|
|
|
%span.text-success{ id: "piece_justificative_#{piece_justificative.type}" } Nous l'avons récupéré pour vous.
|
2015-08-11 15:39:16 +02:00
|
|
|
-else
|
2015-09-21 17:59:03 +02:00
|
|
|
-if piece_justificative.empty?
|
2016-03-14 10:22:27 +01:00
|
|
|
= file_field_tag "piece_justificative_#{piece_justificative.type}", accept: " application/pdf,
|
|
|
|
application/msword,
|
|
|
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
|
|
|
application/vnd.ms-excel,
|
|
|
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
|
|
|
application/vnd.ms-powerpoint,
|
|
|
|
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
|
|
|
application/vnd.oasis.opendocument.text,
|
|
|
|
application/vnd.oasis.opendocument.presentation,
|
|
|
|
application/vnd.oasis.opendocument.spreadsheet", :max_file_size => 3.megabytes
|
2015-08-20 12:20:54 +02:00
|
|
|
-else
|
|
|
|
%span.btn.btn-sm.btn-file.btn-success
|
|
|
|
Modifier
|
2016-03-14 10:22:27 +01:00
|
|
|
= file_field_tag "piece_justificative_#{piece_justificative.type}", accept: " application/pdf,
|
|
|
|
application/msword,
|
|
|
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
|
|
|
application/vnd.ms-excel,
|
|
|
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
|
|
|
application/vnd.ms-powerpoint,
|
|
|
|
application/vnd.openxmlformats-officedocument.presentationml.presentation,
|
|
|
|
application/vnd.oasis.opendocument.text,
|
|
|
|
application/vnd.oasis.opendocument.presentation,
|
|
|
|
application/vnd.oasis.opendocument.spreadsheet", :max_file_size => 3.megabytes
|
2016-02-08 19:52:07 +01:00
|
|
|
|
2015-08-18 10:43:36 +02:00
|
|
|
%div{style: 'text-align:right'}
|
|
|
|
%h6 Tous les champs portant un * sont obligatoires.
|
2015-08-10 11:05:06 +02:00
|
|
|
|
2015-09-28 10:32:41 +02:00
|
|
|
-if !@dossier.draft?
|
2015-08-18 10:43:36 +02:00
|
|
|
=render partial: '/layouts/modifications_terminees'
|
|
|
|
-else
|
2015-09-28 10:32:41 +02:00
|
|
|
= submit_tag 'Soumettre mon dossier', id: 'suivant', class: %w(btn btn btn-success), style: 'float:right', data: { disable_with: 'Soumettre votre dossier', submit: true}
|
2015-08-10 11:05:06 +02:00
|
|
|
|
2015-08-18 10:43:36 +02:00
|
|
|
%br
|
|
|
|
%br
|