2019-09-04 21:01:54 +05:30
|
|
|
- max_name_length = 128
|
|
|
|
- max_username_length = 255
|
2017-08-17 22:00:37 +05:30
|
|
|
#register-pane.tab-pane.login-box{ role: 'tabpanel' }
|
2015-04-26 12:48:37 +05:30
|
|
|
.login-body
|
2017-08-17 22:00:37 +05:30
|
|
|
= form_for(resource, as: "new_#{resource_name}", url: registration_path(resource_name), html: { class: "new_new_user gl-show-field-errors", "aria-live" => "assertive" }) do |f|
|
2015-04-26 12:48:37 +05:30
|
|
|
.devise-errors
|
2019-09-04 21:01:54 +05:30
|
|
|
= render "devise/shared/error_messages", resource: resource
|
2019-07-07 11:18:12 +05:30
|
|
|
.name.form-group
|
2019-09-04 21:01:54 +05:30
|
|
|
= f.label :name, _('Full name'), class: 'label-bold'
|
|
|
|
= f.text_field :name, class: "form-control top qa-new-user-name js-block-emoji js-validate-length", :data => { :max_length => max_name_length, :max_length_message => s_("SignUp|Name is too long (maximum is %{max_length} characters).") % { max_length: max_name_length } }, required: true, title: _("This field is required.")
|
2017-08-17 22:00:37 +05:30
|
|
|
.username.form-group
|
2018-11-20 20:47:30 +05:30
|
|
|
= f.label :username, class: 'label-bold'
|
2019-09-04 21:01:54 +05:30
|
|
|
= f.text_field :username, class: "form-control middle qa-new-user-username js-block-emoji js-validate-length", :data => { :max_length => max_username_length, :max_length_message => s_("SignUp|Username is too long (maximum is %{max_length} characters).") % { max_length: max_username_length } }, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.")
|
|
|
|
%p.validation-error.field-validation.hide= _('Username is already taken.')
|
|
|
|
%p.validation-success.field-validation.hide= _('Username is available.')
|
|
|
|
%p.validation-pending.field-validation.hide= _('Checking username availability...')
|
2017-08-17 22:00:37 +05:30
|
|
|
.form-group
|
2018-11-20 20:47:30 +05:30
|
|
|
= f.label :email, class: 'label-bold'
|
2019-09-04 21:01:54 +05:30
|
|
|
= f.email_field :email, class: "form-control middle qa-new-user-email", required: true, title: _("Please provide a valid email address.")
|
2017-08-17 22:00:37 +05:30
|
|
|
.form-group
|
2018-11-20 20:47:30 +05:30
|
|
|
= f.label :email_confirmation, class: 'label-bold'
|
2019-09-04 21:01:54 +05:30
|
|
|
= f.email_field :email_confirmation, class: "form-control middle qa-new-user-email-confirmation", required: true, title: _("Please retype the email address.")
|
2015-04-26 12:48:37 +05:30
|
|
|
.form-group.append-bottom-20#password-strength
|
2018-11-20 20:47:30 +05:30
|
|
|
= f.label :password, class: 'label-bold'
|
2019-09-04 21:01:54 +05:30
|
|
|
= f.password_field :password, class: "form-control bottom qa-new-user-password", required: true, pattern: ".{#{@minimum_password_length},}", title: _("Minimum length is %{minimum_password_length} characters.") % { minimum_password_length: @minimum_password_length }
|
|
|
|
%p.gl-field-hint.text-secondary= _('Minimum length is %{minimum_password_length} characters') % { minimum_password_length: @minimum_password_length }
|
2018-11-08 19:23:39 +05:30
|
|
|
- if Gitlab::CurrentSettings.current_application_settings.enforce_terms?
|
|
|
|
.form-group
|
2018-12-13 13:39:08 +05:30
|
|
|
= check_box_tag :terms_opt_in, '1', false, required: true, class: 'qa-new-user-accept-terms'
|
2018-11-08 19:23:39 +05:30
|
|
|
= label_tag :terms_opt_in do
|
|
|
|
- terms_link = link_to s_("I accept the|Terms of Service and Privacy Policy"), terms_path, target: "_blank"
|
|
|
|
- accept_terms_label = _("I accept the %{terms_link}") % { terms_link: terms_link }
|
|
|
|
= accept_terms_label.html_safe
|
2019-09-04 21:01:54 +05:30
|
|
|
= render_if_exists 'devise/shared/email_opted_in', f: f
|
2016-01-14 18:37:52 +05:30
|
|
|
%div
|
2017-08-17 22:00:37 +05:30
|
|
|
- if Gitlab::Recaptcha.enabled?
|
2016-01-14 18:37:52 +05:30
|
|
|
= recaptcha_tags
|
2017-09-10 17:25:29 +05:30
|
|
|
.submit-container
|
2019-09-04 21:01:54 +05:30
|
|
|
= f.submit _("Register"), class: "btn-register btn qa-new-user-register-button"
|