mastodon/app/views/settings/deletes/show.html.haml
Claire 9f4930ec11
Add password autocomplete hints (#20071)
Fixes #20067

Our password autocomplete hints were “off” but that does not prevent current
browsers from trying to autocomplete them anyway, so use `current-password` and
`new-password` so they don't put a newly-generated password in a password
confirmation prompt, or the old password for a password renewal prompt.
2022-11-08 03:53:06 +01:00

29 lines
1.3 KiB
Text

- content_for :page_title do
= t('settings.delete')
= simple_form_for @confirmation, url: settings_delete_path, method: :delete do |f|
%p.hint= t('deletes.warning.before')
%ul.hint
- if current_user.confirmed? && current_user.approved?
%li.warning-hint= t('deletes.warning.irreversible')
%li.warning-hint= t('deletes.warning.username_unavailable')
%li.warning-hint= t('deletes.warning.data_removal')
%li.warning-hint= t('deletes.warning.caches')
- else
%li.positive-hint= t('deletes.warning.email_change_html', path: edit_user_registration_path)
%li.positive-hint= t('deletes.warning.email_reconfirmation_html', path: new_user_confirmation_path)
%li.positive-hint= t('deletes.warning.email_contact_html', email: Setting.site_contact_email)
%li.positive-hint= t('deletes.warning.username_available')
%p.hint= t('deletes.warning.more_details_html', terms_path: privacy_policy_path)
%hr.spacer/
- if current_user.encrypted_password.present?
= f.input :password, wrapper: :with_block_label, input_html: { :autocomplete => 'current-password' }, hint: t('deletes.confirm_password')
- else
= f.input :username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, hint: t('deletes.confirm_username')
.actions
= f.button :button, t('deletes.proceed'), type: :submit, class: 'negative'