edit.html.haml 1.1 KB

1234567891011121314151617181920
  1. - content_for :page_title do
  2. = t('auth.set_new_password')
  3. = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, novalidate: false }) do |f|
  4. = render 'shared/error_messages', object: resource
  5. - if !use_seamless_external_login? || resource.encrypted_password.present?
  6. = f.input :reset_password_token, as: :hidden
  7. .fields-group
  8. = f.input :password, wrapper: :with_label, autofocus: true, label: t('simple_form.labels.defaults.new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.new_password'), :autocomplete => 'off', :minlength => User.password_length.first, :maxlength => User.password_length.last }, required: true
  9. .fields-group
  10. = f.input :password_confirmation, wrapper: :with_label, label: t('simple_form.labels.defaults.confirm_new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_new_password'), :autocomplete => 'off' }, required: true
  11. .actions
  12. = f.button :button, t('auth.set_new_password'), type: :submit
  13. - else
  14. %p.hint= t('users.seamless_external_login')
  15. .form-footer= render 'auth/shared/links'