From 1d411aa67278e5fb270a30bc78ea0a997d43d467 Mon Sep 17 00:00:00 2001 From: Antoine Girard Date: Thu, 26 Dec 2024 15:12:55 +0100 Subject: [PATCH] Review --- app/javascript/application_agent.js | 2 -- app/javascript/application_agent_config.js | 3 +-- app/views/common/form/_new_password_input.html.slim | 4 ++-- app/views/users/invitations/edit.html.slim | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/javascript/application_agent.js b/app/javascript/application_agent.js index 4930f8b61..0775badb1 100644 --- a/app/javascript/application_agent.js +++ b/app/javascript/application_agent.js @@ -1,5 +1,3 @@ -import DsfrNewPassword from "./components/dsfr-new-password"; - require("@rails/ujs").start() require("turbolinks").start() import 'bootstrap' diff --git a/app/javascript/application_agent_config.js b/app/javascript/application_agent_config.js index a4d6e5c8f..30a122185 100644 --- a/app/javascript/application_agent_config.js +++ b/app/javascript/application_agent_config.js @@ -1,7 +1,6 @@ -import DsfrNewPassword from "./components/dsfr-new-password"; - require("@rails/ujs").start() require("turbolinks").start() +import { DsfrNewPassword } from "./components/dsfr-new-password"; import { Modal } from './components/modal'; import './components/browser-detection'; import 'select2/dist/js/select2.min.js'; diff --git a/app/views/common/form/_new_password_input.html.slim b/app/views/common/form/_new_password_input.html.slim index 2144e76d6..1149712d8 100644 --- a/app/views/common/form/_new_password_input.html.slim +++ b/app/views/common/form/_new_password_input.html.slim @@ -1,8 +1,8 @@ /# locals: (f:, hint: nil, password_label: nil) -= f.dsfr_input_group :password, class: "fr-password fr-mt-2w", data: {component: "js_dsfr_new_password"} += f.dsfr_input_group :password, class: "fr-password", data: {component: "js_dsfr_new_password"} = f.dsfr_label_with_hint :password, class: "fr-label fr-password__label", hint: hint, label: password_label - .fr-input-wrap + .fr-input-wrap.fr-mt-0 = f.password_field :password, class: "fr-input fr-password__input", required: "true", autocomplete: "new-password" = f.dsfr_error_message :password .fr-password__checkbox.fr-checkbox-group.fr-checkbox-group--sm diff --git a/app/views/users/invitations/edit.html.slim b/app/views/users/invitations/edit.html.slim index f90725fbf..ef21ac511 100644 --- a/app/views/users/invitations/edit.html.slim +++ b/app/views/users/invitations/edit.html.slim @@ -15,6 +15,6 @@ .fr-col-md-12= f.dsfr_email_field :email, value: resource.email, disabled: true - else .fr-col-md-12= f.dsfr_email_field :email, required: true - .fr-col-md-12= f.dsfr_phone_field :phone_number - = render "common/form/new_password_input", f: f + .fr-col-md-12= f.dsfr_phone_field :phone_number, hint: "Saisissez un numéro à 10 chiffres de France métropole ou d’outre-mer, ou bien un numéro international avec le préfixe du pays." + .fr-col-md-12 = render "common/form/new_password_input", f: f .rdv-text-align-center= f.submit "Enregistrer", class: "fr-btn"