new.html.haml 1.8 KB

12345678910111213141516171819202122232425262728293031323334
  1. - content_for :page_title do
  2. = t('auth.register')
  3. - content_for :header_tags do
  4. = render partial: 'shared/og'
  5. = simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
  6. = render 'shared/error_messages', object: resource
  7. - if @invite.present? && @invite.autofollow?
  8. .fields-group{ style: 'margin-bottom: 30px' }
  9. %p.hint{ style: 'text-align: center' }= t('invites.invited_by')
  10. = render 'application/card', account: @invite.user.account
  11. = f.simple_fields_for :account do |ff|
  12. .fields-group
  13. = ff.input :username, wrapper: :with_label, autofocus: true, label: t('simple_form.labels.defaults.username'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off' }, append: "@#{site_hostname}", hint: t('simple_form.hints.defaults.username', domain: site_hostname)
  14. .fields-group
  15. = f.input :email, wrapper: :with_label, label: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }
  16. .fields-group
  17. = f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }
  18. .fields-group
  19. = f.input :password_confirmation, wrapper: :with_label, label: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }
  20. = f.input :invite_code, as: :hidden
  21. %p.hint= t('auth.agreement_html', rules_path: about_more_path, terms_path: terms_path)
  22. .actions
  23. = f.button :button, t('auth.register'), type: :submit
  24. .form-footer= render 'auth/shared/links'