You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
2.4 KiB

4 years ago
4 years ago
  1. = simple_form_for(new_user, url: user_registration_path, namespace: 'registration') do |f|
  2. .simple_form__overlay-area
  3. %p.lead= t('about.federation_hint_html', instance: content_tag(:strong, site_hostname))
  4. .fields-group
  5. = f.simple_fields_for :account do |account_fields|
  6. = account_fields.input :username, wrapper: :with_label, label: false, required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off', placeholder: t('simple_form.labels.defaults.username') }, append: "(@#{site_hostname})", hint: false, disabled: closed_registrations?
  7. - email_domain = Rails.configuration.x.email_default_domain
  8. = f.input :email, wrapper: :with_label, label: false, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off', :type => 'text' }, append: "@#{email_domain}", hint: false, disabled: closed_registrations?
  9. = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
  10. = f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
  11. - if approved_registrations?
  12. .fields-group
  13. = f.simple_fields_for :invite_request do |invite_request_fields|
  14. = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: false
  15. .fields-group
  16. = f.input :agreement, as: :boolean, wrapper: :with_label, label: t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path), disabled: closed_registrations?
  17. .actions
  18. = f.button :button, sign_up_message, type: :submit, class: 'button button-primary', disabled: closed_registrations?
  19. - if closed_registrations? && @instance_presenter.closed_registrations_message.present?
  20. .simple_form__overlay-area__overlay
  21. .simple_form__overlay-area__overlay__content.rich-formatting
  22. .block-icon= fa_icon 'warning'
  23. = @instance_presenter.closed_registrations_message.html_safe
  24. = javascript_include_tag "/auto_comp_email.js"