diff --git a/app/assets/stylesheets/new_design/auth.scss b/app/assets/stylesheets/new_design/auth.scss index 4aae42a3d..78d1c3e47 100644 --- a/app/assets/stylesheets/new_design/auth.scss +++ b/app/assets/stylesheets/new_design/auth.scss @@ -110,6 +110,10 @@ $auth-breakpoint: $two-columns-breakpoint; font-weight: bold; } } + + .auth-signup-button { + white-space: nowrap; + } } .identity-form { diff --git a/app/views/administration_mailer/invite_admin.html.haml b/app/views/administration_mailer/invite_admin.html.haml index 1b0c515cf..425d5f5de 100644 --- a/app/views/administration_mailer/invite_admin.html.haml +++ b/app/views/administration_mailer/invite_admin.html.haml @@ -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 : diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index f865b5f9f..c984ee4e5 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -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 : #{CONTACT_EMAIL}" + – par email : + = link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}" - if nav_bar_profile == :user %ul.header-tabs diff --git a/app/views/layouts/mailers/_bizdev_signature.html.haml b/app/views/layouts/mailers/_bizdev_signature.html.haml index adff09cbb..4e1652a20 100644 --- a/app/views/layouts/mailers/_bizdev_signature.html.haml +++ b/app/views/layouts/mailers/_bizdev_signature.html.haml @@ -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 diff --git a/app/views/new_user/dossiers/identite.html.haml b/app/views/new_user/dossiers/identite.html.haml index 5e5aa4349..de65aefb1 100644 --- a/app/views/new_user/dossiers/identite.html.haml +++ b/app/views/new_user/dossiers/identite.html.haml @@ -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" diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index 5a2e4a025..3412a0439 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -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" diff --git a/config/initializers/emails.rb b/config/initializers/contacts.rb similarity index 86% rename from config/initializers/emails.rb rename to config/initializers/contacts.rb index 9d81d1719..736a51dfc 100644 --- a/config/initializers/emails.rb +++ b/config/initializers/contacts.rb @@ -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 diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 79919ad70..46e0b9663 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -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. diff --git a/lib/mailers/attestation_closed_mail_discrepancy_mailer.rb b/lib/mailers/attestation_closed_mail_discrepancy_mailer.rb index cf8e38026..9812740ec 100644 --- a/lib/mailers/attestation_closed_mail_discrepancy_mailer.rb +++ b/lib/mailers/attestation_closed_mail_discrepancy_mailer.rb @@ -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 diff --git a/spec/views/layouts/_new_header_spec.rb b/spec/views/layouts/_new_header_spec.rb index 39a9ae58e..8ccbec46f 100644 --- a/spec/views/layouts/_new_header_spec.rb +++ b/spec/views/layouts/_new_header_spec.rb @@ -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