commit
7cd682fd4a
20 changed files with 56 additions and 15 deletions
|
@ -38,6 +38,7 @@ function on_change_type_de_champ_select (){
|
||||||
break;
|
break;
|
||||||
case 'drop_down_list':
|
case 'drop_down_list':
|
||||||
case 'multiple_drop_down_list':
|
case 'multiple_drop_down_list':
|
||||||
|
case 'linked_drop_down_list':
|
||||||
parent.children(".drop-down-list").addClass('show-inline');
|
parent.children(".drop-down-list").addClass('show-inline');
|
||||||
break;
|
break;
|
||||||
case 'piece_justificative':
|
case 'piece_justificative':
|
||||||
|
|
|
@ -110,6 +110,10 @@ $auth-breakpoint: $two-columns-breakpoint;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.auth-signup-button {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.identity-form {
|
.identity-form {
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
module TypeDeChampHelper
|
module TypeDeChampHelper
|
||||||
|
TOGGLES = {
|
||||||
|
'piece_justificative' => :champ_pj?,
|
||||||
|
'siret' => :champ_siret?,
|
||||||
|
'linked_drop_down_list' => :champ_linked_dropdown?
|
||||||
|
}
|
||||||
|
|
||||||
def tdc_options
|
def tdc_options
|
||||||
tdcs = TypeDeChamp.type_de_champs_list_fr
|
tdcs = TypeDeChamp.type_de_champs_list_fr
|
||||||
|
|
||||||
if !Flipflop.champ_pj?
|
tdcs.select! do |tdc|
|
||||||
tdcs.reject! { |tdc| tdc.last == "piece_justificative" }
|
toggle = TOGGLES[tdc.last]
|
||||||
end
|
toggle.blank? || Flipflop.send(toggle)
|
||||||
|
|
||||||
if !Flipflop.champ_siret?
|
|
||||||
tdcs.reject! { |tdc| tdc.last == "siret" }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
tdcs
|
tdcs
|
||||||
|
|
2
app/models/champs/linked_drop_down_list_champ.rb
Normal file
2
app/models/champs/linked_drop_down_list_champ.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
class Champs::LinkedDropDownListChamp < Champ
|
||||||
|
end
|
|
@ -13,6 +13,7 @@ class TypeDeChamp < ApplicationRecord
|
||||||
yes_no: 'yes_no',
|
yes_no: 'yes_no',
|
||||||
drop_down_list: 'drop_down_list',
|
drop_down_list: 'drop_down_list',
|
||||||
multiple_drop_down_list: 'multiple_drop_down_list',
|
multiple_drop_down_list: 'multiple_drop_down_list',
|
||||||
|
linked_drop_down_list: 'linked_drop_down_list',
|
||||||
pays: 'pays',
|
pays: 'pays',
|
||||||
regions: 'regions',
|
regions: 'regions',
|
||||||
departements: 'departements',
|
departements: 'departements',
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
class TypesDeChamp::LinkedDropDownListTypeDeChamp < TypeDeChamp
|
||||||
|
end
|
|
@ -14,7 +14,7 @@
|
||||||
%h4 Description
|
%h4 Description
|
||||||
= ff.text_area :description, class: 'form-control description', placeholder: 'Description', rows: 3
|
= ff.text_area :description, class: 'form-control description', placeholder: 'Description', rows: 3
|
||||||
|
|
||||||
.form-group.drop-down-list{ class: (%w(drop_down_list multiple_drop_down_list).include?(type_champ) ? 'show-inline' : nil), style: 'margin-right: 5px;' }
|
.form-group.drop-down-list{ class: (%w(drop_down_list multiple_drop_down_list linked_drop_down_list).include?(type_champ) ? 'show-inline' : nil), style: 'margin-right: 5px;' }
|
||||||
%h4 Liste déroulante
|
%h4 Liste déroulante
|
||||||
= ff.fields_for :drop_down_list_attributes, ff.object.object.drop_down_list do |fff|
|
= ff.fields_for :drop_down_list_attributes, ff.object.object.drop_down_list do |fff|
|
||||||
~ fff.text_area :value, class: 'form-control drop_down_list', placeholder: "Ecrire une valeur par ligne et --valeur-- pour un séparateur.", rows: 3, cols: 30
|
~ fff.text_area :value, class: 'form-control drop_down_list', placeholder: "Ecrire une valeur par ligne et --valeur-- pour un séparateur.", rows: 3, cols: 30
|
||||||
|
|
|
@ -13,7 +13,9 @@
|
||||||
%p
|
%p
|
||||||
Afin de vous accompagner dans la découverte de demarches-simplifiees.fr, je vous propose de m’appeler pour faire un point sur vos besoins de dématérialisation.
|
Afin de vous accompagner dans la découverte de demarches-simplifiees.fr, je vous propose de m’appeler pour faire un point sur vos besoins de dématérialisation.
|
||||||
%br
|
%br
|
||||||
Vous pouvez me joindre au numéro suivant : 01 76 42 02 87.
|
Vous pouvez me joindre au numéro suivant :
|
||||||
|
= CONTACT_PHONE
|
||||||
|
\.
|
||||||
|
|
||||||
%p
|
%p
|
||||||
Je vous invite également à consulter notre site de documentation qui regroupe l'ensemble des informations relatives à demarches-simplifiees.fr ainsi que des tutoriels d’utilisation :
|
Je vous invite également à consulter notre site de documentation qui regroupe l'ensemble des informations relatives à demarches-simplifiees.fr ainsi que des tutoriels d’utilisation :
|
||||||
|
|
|
@ -27,9 +27,11 @@
|
||||||
.contact-details
|
.contact-details
|
||||||
Vous avez besoin d’aide ? Contactez-nous :
|
Vous avez besoin d’aide ? Contactez-nous :
|
||||||
%br
|
%br
|
||||||
– par téléphone : 01 76 42 02 87
|
– par téléphone :
|
||||||
|
= link_to CONTACT_PHONE, "tel:#{CONTACT_PHONE}"
|
||||||
%br
|
%br
|
||||||
= "– par email : <a href='mailto:#{CONTACT_EMAIL}'>#{CONTACT_EMAIL}</a>"
|
– par email :
|
||||||
|
= link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}"
|
||||||
|
|
||||||
- if nav_bar_profile == :user
|
- if nav_bar_profile == :user
|
||||||
%ul.header-tabs
|
%ul.header-tabs
|
||||||
|
|
|
@ -6,7 +6,8 @@ Cordialement,
|
||||||
%br
|
%br
|
||||||
Équipe demarches-simplifiees.fr
|
Équipe demarches-simplifiees.fr
|
||||||
%br
|
%br
|
||||||
Téléphone (standard) : 01 76 42 02 87
|
Téléphone (standard) :
|
||||||
|
= CONTACT_PHONE
|
||||||
%br
|
%br
|
||||||
Incubateur de Services Numériques / beta.gouv.fr
|
Incubateur de Services Numériques / beta.gouv.fr
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
%tr
|
%tr
|
||||||
%th.libelle SIRET :
|
%th.libelle SIRET :
|
||||||
%td= etablissement.siret
|
%td= etablissement.siret
|
||||||
|
|
||||||
|
- if etablissement.siret != etablissement.entreprise.siret_siege_social
|
||||||
|
%tr
|
||||||
|
%th.libelle SIRET du siège social:
|
||||||
|
%td= etablissement.entreprise.siret_siege_social
|
||||||
%tr
|
%tr
|
||||||
%th.libelle Forme juridique :
|
%th.libelle Forme juridique :
|
||||||
%td= sanitize(etablissement.entreprise.forme_juridique)
|
%td= sanitize(etablissement.entreprise.forme_juridique)
|
||||||
|
|
|
@ -44,5 +44,6 @@
|
||||||
= df.check_box :autorisation_donnees, required: true
|
= df.check_box :autorisation_donnees, required: true
|
||||||
J'accepte
|
J'accepte
|
||||||
= link_to "les CGU", CGU_URL, target: :blank
|
= link_to "les CGU", CGU_URL, target: :blank
|
||||||
|
%span.mandatory *
|
||||||
|
|
||||||
= f.submit "Continuer", class: "button large primary expand"
|
= f.submit "Continuer", class: "button large primary expand"
|
||||||
|
|
|
@ -57,4 +57,4 @@
|
||||||
%p.register
|
%p.register
|
||||||
%span
|
%span
|
||||||
Nouveau sur demarches-simplifiees.fr ?
|
Nouveau sur demarches-simplifiees.fr ?
|
||||||
= link_to "Créer un compte", new_registration_path(resource_name), class: "button"
|
= link_to "Créer un compte", new_registration_path(resource_name), class: "button auth-signup-button"
|
||||||
|
|
|
@ -11,6 +11,8 @@ Flipflop.configure do
|
||||||
title: "Champ pièce justificative"
|
title: "Champ pièce justificative"
|
||||||
feature :champ_siret,
|
feature :champ_siret,
|
||||||
title: "Champ SIRET"
|
title: "Champ SIRET"
|
||||||
|
feature :champ_linked_dropdown,
|
||||||
|
title: "Champ double menu déroulant"
|
||||||
end
|
end
|
||||||
|
|
||||||
feature :web_hook
|
feature :web_hook
|
||||||
|
|
|
@ -3,5 +3,7 @@ if !defined?(CONTACT_EMAIL)
|
||||||
EQUIPE_EMAIL = "equipe@demarches-simplifiees.fr"
|
EQUIPE_EMAIL = "equipe@demarches-simplifiees.fr"
|
||||||
TECH_EMAIL = "tech@demarches-simplifiees.fr"
|
TECH_EMAIL = "tech@demarches-simplifiees.fr"
|
||||||
|
|
||||||
|
CONTACT_PHONE = "01 76 42 02 87"
|
||||||
|
|
||||||
OLD_CONTACT_EMAIL = "contact@tps.apientreprise.fr"
|
OLD_CONTACT_EMAIL = "contact@tps.apientreprise.fr"
|
||||||
end
|
end
|
|
@ -1,4 +1,4 @@
|
||||||
require_relative "emails"
|
require_relative "contacts"
|
||||||
|
|
||||||
# Use this hook to configure devise mailer, warden hooks and so forth.
|
# Use this hook to configure devise mailer, warden hooks and so forth.
|
||||||
# Many of these configuration options can be set straight in your model.
|
# Many of these configuration options can be set straight in your model.
|
||||||
|
|
|
@ -17,13 +17,14 @@ fr:
|
||||||
address: 'Adresse'
|
address: 'Adresse'
|
||||||
yes_no: 'Oui/Non'
|
yes_no: 'Oui/Non'
|
||||||
drop_down_list: 'Menu déroulant'
|
drop_down_list: 'Menu déroulant'
|
||||||
|
multiple_drop_down_list: 'Menu déroulant à choix multiples'
|
||||||
|
linked_drop_down_list: 'Deux menus déroulants liés'
|
||||||
pays: 'Pays'
|
pays: 'Pays'
|
||||||
regions: 'Régions'
|
regions: 'Régions'
|
||||||
departements: 'Départements'
|
departements: 'Départements'
|
||||||
engagement: 'Engagement'
|
engagement: 'Engagement'
|
||||||
header_section: 'Titre de section'
|
header_section: 'Titre de section'
|
||||||
explication: 'Explication'
|
explication: 'Explication'
|
||||||
multiple_drop_down_list: 'Menu déroulant à choix multiples'
|
|
||||||
dossier_link: 'Lien vers un autre dossier'
|
dossier_link: 'Lien vers un autre dossier'
|
||||||
piece_justificative: 'Pièce justificative'
|
piece_justificative: 'Pièce justificative'
|
||||||
siret: 'SIRET'
|
siret: 'SIRET'
|
||||||
|
|
|
@ -34,7 +34,7 @@ module Mailers
|
||||||
|
|
||||||
#{detail_procedures(procedures)}
|
#{detail_procedures(procedures)}
|
||||||
|
|
||||||
Pour toute question vous pouvez nous joindre par téléphone au 01 76 42 02 87
|
Pour toute question vous pouvez nous joindre par téléphone au #{CONTACT_PHONE}
|
||||||
ou sur l’adresse email #{CONTACT_EMAIL}.
|
ou sur l’adresse email #{CONTACT_EMAIL}.
|
||||||
-- \nL’équipe demarches-simplifiees.fr
|
-- \nL’équipe demarches-simplifiees.fr
|
||||||
HEREDOC
|
HEREDOC
|
||||||
|
|
|
@ -50,6 +50,10 @@ FactoryBot.define do
|
||||||
type_champ 'multiple_drop_down_list'
|
type_champ 'multiple_drop_down_list'
|
||||||
drop_down_list { create(:drop_down_list) }
|
drop_down_list { create(:drop_down_list) }
|
||||||
end
|
end
|
||||||
|
factory :type_de_champ_linked_drop_down_list, class: 'TypesDeChamp::LinkedDropDownListTypeDeChamp' do
|
||||||
|
type_champ 'linked_drop_down_list'
|
||||||
|
drop_down_list { create(:drop_down_list) }
|
||||||
|
end
|
||||||
factory :type_de_champ_pays, class: 'TypesDeChamp::PaysTypeDeChamp' do
|
factory :type_de_champ_pays, class: 'TypesDeChamp::PaysTypeDeChamp' do
|
||||||
type_champ 'pays'
|
type_champ 'pays'
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,7 @@ require 'spec_helper'
|
||||||
describe 'layouts/_new_header.html.haml', type: :view do
|
describe 'layouts/_new_header.html.haml', type: :view do
|
||||||
describe 'logo link' do
|
describe 'logo link' do
|
||||||
before do
|
before do
|
||||||
|
sign_in user
|
||||||
allow(controller).to receive(:nav_bar_profile).and_return(profile)
|
allow(controller).to receive(:nav_bar_profile).and_return(profile)
|
||||||
render
|
render
|
||||||
end
|
end
|
||||||
|
@ -10,15 +11,22 @@ describe 'layouts/_new_header.html.haml', type: :view do
|
||||||
subject { rendered }
|
subject { rendered }
|
||||||
|
|
||||||
context 'when rendering for user' do
|
context 'when rendering for user' do
|
||||||
|
let(:user) { create(:user) }
|
||||||
let(:profile) { :user }
|
let(:profile) { :user }
|
||||||
|
|
||||||
it { is_expected.to have_css("a.header-logo[href=\"#{users_dossiers_path}\"]") }
|
it { is_expected.to have_css("a.header-logo[href=\"#{users_dossiers_path}\"]") }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when rendering for gestionnaire' do
|
context 'when rendering for gestionnaire' do
|
||||||
|
let(:user) { create(:gestionnaire) }
|
||||||
let(:profile) { :gestionnaire }
|
let(:profile) { :gestionnaire }
|
||||||
|
|
||||||
it { is_expected.to have_css("a.header-logo[href=\"#{gestionnaire_procedures_path}\"]") }
|
it { is_expected.to have_css("a.header-logo[href=\"#{gestionnaire_procedures_path}\"]") }
|
||||||
|
|
||||||
|
it "displays the contact infos" do
|
||||||
|
expect(rendered).to have_text("Contact")
|
||||||
|
expect(rendered).to have_link(CONTACT_EMAIL, href: "mailto:#{CONTACT_EMAIL}")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue