commit
7cd682fd4a
20 changed files with 56 additions and 15 deletions
|
@ -38,6 +38,7 @@ function on_change_type_de_champ_select (){
|
|||
break;
|
||||
case 'drop_down_list':
|
||||
case 'multiple_drop_down_list':
|
||||
case 'linked_drop_down_list':
|
||||
parent.children(".drop-down-list").addClass('show-inline');
|
||||
break;
|
||||
case 'piece_justificative':
|
||||
|
|
|
@ -110,6 +110,10 @@ $auth-breakpoint: $two-columns-breakpoint;
|
|||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.auth-signup-button {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.identity-form {
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
module TypeDeChampHelper
|
||||
TOGGLES = {
|
||||
'piece_justificative' => :champ_pj?,
|
||||
'siret' => :champ_siret?,
|
||||
'linked_drop_down_list' => :champ_linked_dropdown?
|
||||
}
|
||||
|
||||
def tdc_options
|
||||
tdcs = TypeDeChamp.type_de_champs_list_fr
|
||||
|
||||
if !Flipflop.champ_pj?
|
||||
tdcs.reject! { |tdc| tdc.last == "piece_justificative" }
|
||||
end
|
||||
|
||||
if !Flipflop.champ_siret?
|
||||
tdcs.reject! { |tdc| tdc.last == "siret" }
|
||||
tdcs.select! do |tdc|
|
||||
toggle = TOGGLES[tdc.last]
|
||||
toggle.blank? || Flipflop.send(toggle)
|
||||
end
|
||||
|
||||
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',
|
||||
drop_down_list: 'drop_down_list',
|
||||
multiple_drop_down_list: 'multiple_drop_down_list',
|
||||
linked_drop_down_list: 'linked_drop_down_list',
|
||||
pays: 'pays',
|
||||
regions: 'regions',
|
||||
departements: 'departements',
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
class TypesDeChamp::LinkedDropDownListTypeDeChamp < TypeDeChamp
|
||||
end
|
|
@ -14,7 +14,7 @@
|
|||
%h4 Description
|
||||
= 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
|
||||
= 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
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
%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.
|
||||
%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
|
||||
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
|
||||
Vous avez besoin d’aide ? Contactez-nous :
|
||||
%br
|
||||
– par téléphone : 01 76 42 02 87
|
||||
– par téléphone :
|
||||
= link_to CONTACT_PHONE, "tel:#{CONTACT_PHONE}"
|
||||
%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
|
||||
%ul.header-tabs
|
||||
|
|
|
@ -6,7 +6,8 @@ Cordialement,
|
|||
%br
|
||||
Équipe demarches-simplifiees.fr
|
||||
%br
|
||||
Téléphone (standard) : 01 76 42 02 87
|
||||
Téléphone (standard) :
|
||||
= CONTACT_PHONE
|
||||
%br
|
||||
Incubateur de Services Numériques / beta.gouv.fr
|
||||
%br
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
%tr
|
||||
%th.libelle 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
|
||||
%th.libelle Forme juridique :
|
||||
%td= sanitize(etablissement.entreprise.forme_juridique)
|
||||
|
|
|
@ -44,5 +44,6 @@
|
|||
= df.check_box :autorisation_donnees, required: true
|
||||
J'accepte
|
||||
= link_to "les CGU", CGU_URL, target: :blank
|
||||
%span.mandatory *
|
||||
|
||||
= f.submit "Continuer", class: "button large primary expand"
|
||||
|
|
|
@ -57,4 +57,4 @@
|
|||
%p.register
|
||||
%span
|
||||
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"
|
||||
feature :champ_siret,
|
||||
title: "Champ SIRET"
|
||||
feature :champ_linked_dropdown,
|
||||
title: "Champ double menu déroulant"
|
||||
end
|
||||
|
||||
feature :web_hook
|
||||
|
|
|
@ -3,5 +3,7 @@ if !defined?(CONTACT_EMAIL)
|
|||
EQUIPE_EMAIL = "equipe@demarches-simplifiees.fr"
|
||||
TECH_EMAIL = "tech@demarches-simplifiees.fr"
|
||||
|
||||
CONTACT_PHONE = "01 76 42 02 87"
|
||||
|
||||
OLD_CONTACT_EMAIL = "contact@tps.apientreprise.fr"
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
require_relative "emails"
|
||||
require_relative "contacts"
|
||||
|
||||
# Use this hook to configure devise mailer, warden hooks and so forth.
|
||||
# Many of these configuration options can be set straight in your model.
|
||||
|
|
|
@ -17,13 +17,14 @@ fr:
|
|||
address: 'Adresse'
|
||||
yes_no: 'Oui/Non'
|
||||
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'
|
||||
regions: 'Régions'
|
||||
departements: 'Départements'
|
||||
engagement: 'Engagement'
|
||||
header_section: 'Titre de section'
|
||||
explication: 'Explication'
|
||||
multiple_drop_down_list: 'Menu déroulant à choix multiples'
|
||||
dossier_link: 'Lien vers un autre dossier'
|
||||
piece_justificative: 'Pièce justificative'
|
||||
siret: 'SIRET'
|
||||
|
|
|
@ -34,7 +34,7 @@ module Mailers
|
|||
|
||||
#{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}.
|
||||
-- \nL’équipe demarches-simplifiees.fr
|
||||
HEREDOC
|
||||
|
|
|
@ -50,6 +50,10 @@ FactoryBot.define do
|
|||
type_champ 'multiple_drop_down_list'
|
||||
drop_down_list { create(:drop_down_list) }
|
||||
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
|
||||
type_champ 'pays'
|
||||
end
|
||||
|
|
|
@ -3,6 +3,7 @@ require 'spec_helper'
|
|||
describe 'layouts/_new_header.html.haml', type: :view do
|
||||
describe 'logo link' do
|
||||
before do
|
||||
sign_in user
|
||||
allow(controller).to receive(:nav_bar_profile).and_return(profile)
|
||||
render
|
||||
end
|
||||
|
@ -10,15 +11,22 @@ describe 'layouts/_new_header.html.haml', type: :view do
|
|||
subject { rendered }
|
||||
|
||||
context 'when rendering for user' do
|
||||
let(:user) { create(:user) }
|
||||
let(:profile) { :user }
|
||||
|
||||
it { is_expected.to have_css("a.header-logo[href=\"#{users_dossiers_path}\"]") }
|
||||
end
|
||||
|
||||
context 'when rendering for gestionnaire' do
|
||||
let(:user) { create(:gestionnaire) }
|
||||
let(:profile) { :gestionnaire }
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue