new.html.haml 1.6 KB

1234567891011121314151617181920212223242526272829
  1. - content_for :page_title do
  2. = t('auth.resend_confirmation')
  3. - if resource.errors.of_kind?(:email, :already_confirmed)
  4. .simple_form
  5. = render 'auth/shared/progress', stage: resource.approved? ? 'completed' : 'confirmed'
  6. - if resource.approved?
  7. %h1.title= t('auth.confirmations.welcome_title', name: resource.account.username)
  8. %p.lead= t('auth.confirmations.registration_complete', domain: site_hostname)
  9. - if resource.created_by_application && redirect_to_app?
  10. - app = resource.created_by_application
  11. %p.lead= t('auth.confirmations.redirect_to_app_html', app_name: app.name, clicking_this_link: link_to(t('auth.confirmations.clicking_this_link'), app.confirmation_redirect_uri))
  12. - else
  13. %p.lead= t('auth.confirmations.proceed_to_login_html', login_link: link_to_login(t('auth.confirmations.login_link')))
  14. - else
  15. %h1.title= t('auth.confirmations.awaiting_review_title')
  16. %p.lead= t('auth.confirmations.awaiting_review', domain: site_hostname)
  17. - else
  18. = simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
  19. = render 'shared/error_messages', object: resource
  20. .fields-group
  21. = 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')
  22. .actions
  23. = f.button :button, t('auth.resend_confirmation'), type: :submit
  24. .form-footer= render 'auth/shared/links'