debian-mirror-gitlab/app/views/devise/shared/_signup_box.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
4.1 KiB
Text
Raw Normal View History

2021-01-03 14:25:43 +05:30
- max_first_name_length = max_last_name_length = 127
2021-02-22 17:27:13 +05:30
- omniauth_providers_placement ||= :bottom
2022-04-04 11:22:00 +05:30
- borderless ||= false
2021-02-22 17:27:13 +05:30
2022-04-04 11:22:00 +05:30
.gl-mb-3.gl-p-4{ class: (borderless ? '' : 'gl-border-gray-100 gl-border-1 gl-border-solid gl-rounded-base') }
2021-02-22 17:27:13 +05:30
- if show_omniauth_providers && omniauth_providers_placement == :top
= render 'devise/shared/signup_omniauth_providers_top'
2021-01-29 00:20:46 +05:30
= form_for(resource, as: "new_#{resource_name}", url: url, html: { class: 'new_user gl-show-field-errors', 'aria-live' => 'assertive' }) do |f|
.devise-errors
= render 'devise/shared/error_messages', resource: resource
2021-03-08 18:12:59 +05:30
- if Gitlab::CurrentSettings.invisible_captcha_enabled
2021-09-04 01:27:46 +05:30
= invisible_captcha nonce: true, autocomplete: SecureRandom.alphanumeric(12)
2021-01-29 00:20:46 +05:30
.name.form-row
.col.form-group
= f.label :first_name, _('First name'), for: 'new_user_first_name', class: 'label-bold'
2021-09-04 01:27:46 +05:30
= f.text_field :first_name,
class: 'form-control gl-form-input top js-block-emoji js-validate-length',
data: { max_length: max_first_name_length,
max_length_message: s_('SignUp|First name is too long (maximum is %{max_length} characters).') % { max_length: max_first_name_length },
qa_selector: 'new_user_first_name_field' },
required: true,
title: _('This field is required.')
2021-01-29 00:20:46 +05:30
.col.form-group
= f.label :last_name, _('Last name'), for: 'new_user_last_name', class: 'label-bold'
2021-09-04 01:27:46 +05:30
= f.text_field :last_name,
class: 'form-control gl-form-input top js-block-emoji js-validate-length',
data: { max_length: max_last_name_length,
max_length_message: s_('SignUp|Last name is too long (maximum is %{max_length} characters).') % { max_length: max_last_name_length },
qa_selector: 'new_user_last_name_field' },
required: true,
title: _('This field is required.')
2021-01-29 00:20:46 +05:30
.username.form-group
= f.label :username, class: 'label-bold'
2021-09-04 01:27:46 +05:30
= f.text_field :username,
class: 'form-control gl-form-input middle js-block-emoji js-validate-length js-validate-username',
data: signup_username_data_attributes,
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
required: true,
title: _('Please create a username with only alphanumeric characters.')
2021-01-29 00:20:46 +05:30
%p.validation-error.gl-text-red-500.gl-field-error-ignore.gl-mt-2.field-validation.hide= _('Username is already taken.')
%p.validation-success.gl-text-green-600.gl-field-error-ignore.gl-mt-2.field-validation.hide= _('Username is available.')
%p.validation-pending.gl-field-error-ignore.gl-mt-2.field-validation.hide= _('Checking username availability...')
.form-group
= f.label :email, class: 'label-bold'
2021-09-04 01:27:46 +05:30
= f.email_field :email,
value: @invite_email,
class: 'form-control gl-form-input middle',
data: { qa_selector: 'new_user_email_field' },
required: true,
title: _('Please provide a valid email address.')
2021-02-22 17:27:13 +05:30
.form-group.gl-mb-5#password-strength
2021-01-29 00:20:46 +05:30
= f.label :password, class: 'label-bold'
2021-09-04 01:27:46 +05:30
= f.password_field :password,
class: 'form-control gl-form-input bottom',
data: { qa_selector: 'new_user_password_field' },
2021-11-18 22:05:49 +05:30
autocomplete: 'new-password',
2021-09-04 01:27:46 +05:30
required: true,
pattern: ".{#{@minimum_password_length},}",
title: s_('SignUp|Minimum length is %{minimum_password_length} characters.') % { minimum_password_length: @minimum_password_length }
2021-01-29 00:20:46 +05:30
%p.gl-field-hint.text-secondary= s_('SignUp|Minimum length is %{minimum_password_length} characters.') % { minimum_password_length: @minimum_password_length }
2021-11-11 11:23:49 +05:30
= render_if_exists 'devise/shared/phone_verification', form: f
2021-01-29 00:20:46 +05:30
%div
- if show_recaptcha_sign_up?
2021-06-08 01:23:25 +05:30
= recaptcha_tags nonce: content_security_policy_nonce
2022-03-02 08:16:31 +05:30
.submit-container.gl-mt-5
2021-09-30 23:02:18 +05:30
= f.submit button_text, class: 'btn gl-button btn-confirm gl-display-block gl-w-full', data: { qa_selector: 'new_user_register_button' }
2021-06-08 01:23:25 +05:30
= render 'devise/shared/terms_of_service_notice', button_text: button_text
2021-02-22 17:27:13 +05:30
- if show_omniauth_providers && omniauth_providers_placement == :bottom
2021-01-29 00:20:46 +05:30
= render 'devise/shared/signup_omniauth_providers'