Skip to content

Commit

Permalink
Change email address input to be disabled for logged-in users when re…
Browse files Browse the repository at this point in the history
…questing a new confirmation e-mail (#23247)

Fixes #23093
  • Loading branch information
ClearlyClaire committed Jan 24, 2023
1 parent 6883fdd commit dd58db6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/auth/confirmations/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dd58db6

Please sign in to comment.