about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-01-24 20:18:25 +0100
committerGitHub <noreply@github.com>2023-01-24 20:18:25 +0100
commitdd58db64d87896698a840b6cffe06a0e816674ef (patch)
treebb6c090b764836cc13d14d3ecb686460564a51ec
parent6883fddb19b1319a378aa5dc2034670c3b27ce39 (diff)
Change email address input to be disabled for logged-in users when requesting a new confirmation e-mail (#23247)
Fixes #23093
-rw-r--r--app/views/auth/confirmations/new.html.haml2
-rw-r--r--config/locales/en.yml2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/views/auth/confirmations/new.html.haml b/app/views/auth/confirmations/new.html.haml
index a294d3cb5..a98257873 100644
--- a/app/views/auth/confirmations/new.html.haml
+++ b/app/views/auth/confirmations/new.html.haml
@@ -5,7 +5,7 @@
   = render 'shared/error_messages', object: resource
 
   .fields-group
-    = f.input :email, autofocus: true, wrapper: :with_label, label: t('simple_form.labels.defaults.email'), input_html: { 'aria-label': t('simple_form.labels.defaults.email') }, hint: false
+    = f.input :email, autofocus: true, wrapper: :with_label, label: t('simple_form.labels.defaults.email'), input_html: { 'aria-label': t('simple_form.labels.defaults.email') }, readonly: current_user.present?, hint: current_user.present? && t('auth.confirmations.wrong_email_hint')
 
   .actions
     = f.button :button, t('auth.resend_confirmation'), type: :submit
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3de2f2772..39ff4236a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -965,6 +965,8 @@ en:
   auth:
     apply_for_account: Request an account
     change_password: Password
+    confirmations:
+      wrong_email_hint: If that e-mail address is not correct, you can change it in account settings.
     delete_account: Delete account
     delete_account_html: If you wish to delete your account, you can <a href="%{path}">proceed here</a>. You will be asked for confirmation.
     description: