demarches-normaliennes/app/views/users/description/_pieces_justificatives.html.haml

29 lines
1.5 KiB
Text
Raw Normal View History

%table{class:'table', style:'width:55%; margin-left:5%'}
- if @dossier.procedure.cerfa_flag
%tr
%th{class:'col-lg-6'}
2016-08-26 09:17:31 +02:00
='Formulaire / CERFA (complété et numérisé)'
%td{class:'col-lg-5'}
-if @dossier.cerfa_available?
%span.btn.btn-sm.btn-file.btn-success
Modifier
2016-10-27 17:00:59 +02:00
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
-else
2016-10-27 17:00:59 +02:00
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
2016-10-07 15:16:03 +02:00
- @dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
%tr
%th.col-lg-6
= type_de_piece_justificative.libelle
%td.col-lg-5
-if type_de_piece_justificative.api_entreprise
%span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous.
-else
-if @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id).nil?
2016-10-27 17:00:59 +02:00
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes
-else
%span.btn.btn-sm.btn-file.btn-success
Modifier
2016-10-27 17:00:59 +02:00
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes