Add lien cerfa vierge in the modification popup
This commit is contained in:
parent
37d31fae7b
commit
ef9012cd82
3 changed files with 35 additions and 37 deletions
|
@ -1,30 +1,33 @@
|
||||||
.row
|
-unless dossier.procedure.lien_demarche.blank?
|
||||||
.col-lg-8.col-lg-push-1
|
%p
|
||||||
%table.table
|
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
|
||||||
- if @dossier.procedure.cerfa_flag
|
= link_to "Télécharger", dossier.procedure.lien_demarche, target: '_blank', id: 'lien_cerfa'
|
||||||
%tr
|
|
||||||
%th.col-lg-6
|
|
||||||
='Formulaire de demande ou CERFA (complété et numérisé)'
|
|
||||||
|
|
||||||
%td.col-lg-5
|
%table.table
|
||||||
-if @dossier.cerfa_available?
|
- if dossier.procedure.cerfa_flag
|
||||||
%span.btn.btn-sm.btn-file.btn-success
|
%tr
|
||||||
Modifier
|
%th.col-lg-6
|
||||||
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
Formulaire de demande ou CERFA (complété et numérisé)
|
||||||
-else
|
|
||||||
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
|
||||||
|
|
||||||
- @dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
|
%td.col-lg-5
|
||||||
%tr
|
-if dossier.cerfa_available?
|
||||||
%th.col-lg-6.piece-libelle
|
%span.btn.btn-sm.btn-file.btn-success
|
||||||
= type_de_piece_justificative.libelle
|
Modifier
|
||||||
%td.col-lg-5
|
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
||||||
-if type_de_piece_justificative.api_entreprise
|
-else
|
||||||
%span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous.
|
%input{type: 'file', name:'cerfa_pdf', id:'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
||||||
-else
|
|
||||||
-if @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id).nil?
|
- dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
|
||||||
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes
|
%tr
|
||||||
-else
|
%th.col-lg-6.piece-libelle
|
||||||
%span.btn.btn-sm.btn-file.btn-success
|
= type_de_piece_justificative.libelle
|
||||||
Modifier
|
%td.col-lg-5
|
||||||
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes
|
-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?
|
||||||
|
= 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
|
||||||
|
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes
|
||||||
|
|
|
@ -24,15 +24,10 @@
|
||||||
%br
|
%br
|
||||||
%h3 Documents administratifs
|
%h3 Documents administratifs
|
||||||
|
|
||||||
-unless @procedure.lien_demarche.blank?
|
|
||||||
%p
|
|
||||||
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
|
|
||||||
%a{style:'font-size:0.9em; padding-left:3px', id: 'lien_cerfa' ,href: "#{@procedure.lien_demarche}", :target => '_blank'} Télécharger
|
|
||||||
|
|
||||||
|
|
||||||
%br
|
|
||||||
//TODO a refactorer
|
//TODO a refactorer
|
||||||
= render partial: 'users/description/pieces_justificatives'
|
.row
|
||||||
|
.col-lg-8
|
||||||
|
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||||
|
|
||||||
- unless Features.opensimplif
|
- unless Features.opensimplif
|
||||||
#state_description.row{style:'width: 50%; margin-left:20px'}
|
#state_description.row{style:'width: 50%; margin-left:20px'}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
Modification des documents
|
Modification des documents
|
||||||
|
|
||||||
.modal-body
|
.modal-body
|
||||||
= render partial: 'users/description/pieces_justificatives'
|
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||||
|
|
||||||
.modal-footer
|
.modal-footer
|
||||||
= submit_tag 'Modification terminée', class: %w(btn btn btn-info), id: 'modification_terminee', data: { disable_with: 'Modification terminée', submit: true}
|
= submit_tag 'Modification terminée', class: %w(btn btn btn-info), id: 'modification_terminee', data: { disable_with: 'Modification terminée', submit: true}
|
||||||
|
|
Loading…
Reference in a new issue