Explicit the use of lien_demarche attr

This commit is contained in:
Xavier J 2016-08-24 11:40:53 +02:00
parent 5b0e01f117
commit 42943aad19
6 changed files with 38 additions and 9 deletions

View file

@ -1,5 +1,10 @@
$(document).on('page:load', buttons_api_carto);
$(document).ready(buttons_api_carto);
$(document).on('page:load', button_edit_procedure_init);
$(document).ready(button_edit_procedure_init);
function button_edit_procedure_init(){
buttons_api_carto();
button_cerfa();
}
function buttons_api_carto () {
@ -9,4 +14,14 @@ function buttons_api_carto () {
if ($('#procedure_module_api_carto_use_api_carto').is(':checked'))
$("#modules_api_carto").show();
}
function button_cerfa () {
$("#procedure_cerfa_flag").on('change', function() {
$("#procedure_lien_demarche").toggle()
});
if ($('#procedure_cerfa_flag').is(':checked'))
$("#procedure_lien_demarche").show();
}

View file

@ -1,3 +1,7 @@
#modules_api_carto {
display: none;
}
#procedure_lien_demarche{
display: none;
}

View file

@ -1,7 +1,7 @@
%br
-{libelle: 'Libellé*', description: 'Description*', lien_demarche: 'Lien démarche', organisation: 'Organisation', direction: 'Direction'}.each do |key, value|
-{libelle: 'Libellé*', description: 'Description*', organisation: 'Organisation', direction: 'Direction'}.each do |key, value|
.form-group{class: ('has-error' if @procedure.errors.messages[key])}
%h4
=value
@ -47,8 +47,11 @@
%label
= ff.check_box :cadastre
Cadastre
.col-md-6.col-lg-6
%h4 Formulaire / CERFA
%label
=f.check_box :cerfa_flag
Activer l'envoi de formulaire / CERFA
%br
=f.text_field :lien_demarche, class: 'form-control', placeholder: 'URL vers le formulaire vierge (facultatif)'

View file

@ -7,9 +7,6 @@
='Formulaire'
%td.col-lg-6.col-md-6
- if @facade.dossier.cerfa_available?
-#- if user_signed_in?
-# = 'Pièce fournie'
-#- elsif gestionnaire_signed_in?
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
%span{style:'margin-left:12px'}
\-

View file

@ -2,7 +2,7 @@
- if @dossier.procedure.cerfa_flag
%tr
%th{class:'col-lg-6'}
='Formulaire'
='Formulaire / CERFA'
%td{class:'col-lg-5'}
-if @dossier.cerfa_available?
@ -27,3 +27,13 @@
Modifier
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 3.megabytes
#state_description.row{style:'width: 50%; margin-left:20px'}
.panel.panel-info
.panel-body.center
.row
.col-md-1.col-lg-1
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
.col-md-11.col-lg-11
Les documents administratifs ne sont pas indispensable afin d'initier votre dossier.
Vous pourrez dans tous les cas les compléter plus tard si vous ne les possédez pas de suite.

View file

@ -16,8 +16,8 @@
-unless @procedure.lien_demarche.blank?
%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
Récupérer le formulaire / 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