Add minim preparation for dossier uniq page

This commit is contained in:
Xavier J 2016-07-18 09:37:22 +02:00
parent 23e582d597
commit 382c8d8700
8 changed files with 37 additions and 15 deletions

View file

@ -31,4 +31,9 @@ function error_form_siret(invalid_siret){
function reset_form_siret(){
$("input[type='submit']").removeClass('btn-danger').addClass('btn-success').val('Valider');
$("#dossier_siret").removeClass('input-error');
}
function toggle_etape_1(){
$('.row.etape.etape_1 .etapes_menu #logos').toggle(100);
$('.row.etape.etape_1 .etapes_informations #description_procedure').toggle(100);
}

View file

@ -8,13 +8,7 @@
-#- if @facade.procedure.module_api_carto.use_api_carto?
-# .row.etape.etape_3
-# .etape.etapes_menu.col-md-3.col-lg-3
-# %h3
-# 3 - Ma zone d'intervention
-# .etape.etapes_informations.col-md-9.col-lg-9
-# = render partial: '/dossiers/etapes/etape3'
-#
-#.row.etape.etape_4
-# .etape.etapes_menu.col-md-3.col-lg-3
-# %h3
-# = "#{@facade.procedure.module_api_carto.use_api_carto? ? '4' : '3'} - Mon dossier"
-# .etape.etapes_informations.col-md-9.col-lg-9
-# = render partial: '/dossiers/etapes/etape4'

View file

@ -2,7 +2,8 @@
%h3
Ma procédure
%br
.center
#logos.center{class: (@facade.entreprise.nil? ? '' : 'mask')}
- if @facade.procedure.euro_flag
#euro_flag.flag
=image_tag('drapeau_europe.png')
@ -15,5 +16,5 @@
%h2#titre_procedure.text-info
= @facade.procedure.libelle
%p{style:'width: 95%;'}
%p#description_procedure{style:'width: 95%;', class: (@facade.entreprise.nil? ? '' : 'mask')}
= h @facade.procedure.description.html_safe

View file

@ -22,6 +22,7 @@
= f.hidden_field :dossier_id, value: @facade.dossier.id
= f.submit 'Valider', class: %w(btn btn-lg btn-success), data: { disable_with: "Recherche en cours ..." }
- else
%br
#recap_info_entreprise
= render partial: '/dossiers/infos_entreprise'

View file

@ -0,0 +1,6 @@
.etape.etapes_menu.col-md-3.col-lg-3
%h3
Ma zone d'intervention
.etape.etapes_informations.col-md-9.col-lg-9
.row

View file

@ -0,0 +1,6 @@
.etape.etapes_menu.col-md-3.col-lg-3
%h3
Mon dossier
.etape.etapes_informations.col-md-9.col-lg-9
.row

View file

@ -1,7 +1,14 @@
$('.row.etape.etape_2').html("<%= escape_javascript(render partial: '/dossiers/etapes/etape2', locals: { facade: @facade } ) %>");
the_terms();
<% unless flash.empty? %>
<% if flash.empty? %>
$('.row.etape.etape_2').hide(300, render_new_siret);
$('.row.etape.etape_2').slideDown(400, the_terms);
toggle_etape_1();
<% else %>
error_form_siret('<%= invalid_siret %>');
<% end %>
<% flash.clear %>
<% flash.clear %>
function render_new_siret(){
$('.row.etape.etape_2').html("<%= escape_javascript(render partial: '/dossiers/etapes/etape2', locals: { facade: @facade } ) %>");
}

View file

@ -26,6 +26,8 @@ CarrierWave.configure do |config|
if Rails.env.production?
config.fog_directory = "tps"
elsif Rails.env.development?
config.fog_directory= "test_local"
else
config.fog_directory = "tps_dev"
end