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

42 lines
3.6 KiB
Text
Raw Normal View History

2020-03-09 13:42:32 +05:30
- max_name_length = 255
2019-09-04 21:01:54 +05:30
- 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-10-12 21:52:04 +05:30
- if Feature.enabled?(:invisible_captcha)
= invisible_captcha
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'
2019-09-30 21:07:59 +05:30
= f.text_field :name, class: "form-control top 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 }, :qa_selector => 'new_user_name_field' }, 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-30 21:07:59 +05:30
= f.text_field :username, class: "form-control middle js-block-emoji js-validate-length js-validate-username", :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 }, :qa_selector => 'new_user_username_field' }, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.")
%p.validation-error.gl-field-error-ignore.field-validation.hide= _('Username is already taken.')
%p.validation-success.gl-field-error-ignore.field-validation.hide= _('Username is available.')
%p.validation-pending.gl-field-error-ignore.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-30 21:07:59 +05:30
= f.email_field :email, class: "form-control middle", data: { qa_selector: 'new_user_email_field' }, 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-30 21:07:59 +05:30
= f.email_field :email_confirmation, class: "form-control middle", data: { qa_selector: 'new_user_email_confirmation_field' }, 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-30 21:07:59 +05:30
= f.password_field :password, class: "form-control bottom", data: { qa_selector: 'new_user_password_field' }, required: true, pattern: ".{#{@minimum_password_length},}", title: _("Minimum length is %{minimum_password_length} characters.") % { minimum_password_length: @minimum_password_length }
2019-09-04 21:01:54 +05:30
%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
2019-09-30 21:07:59 +05:30
= check_box_tag :terms_opt_in, '1', false, required: true, data: { qa_selector: 'new_user_accept_terms_checkbox' }
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
%div
2019-09-30 21:07:59 +05:30
- if show_recaptcha_sign_up?
= recaptcha_tags
2017-09-10 17:25:29 +05:30
.submit-container
2019-09-30 21:07:59 +05:30
= f.submit _("Register"), class: "btn-register btn", data: { qa_selector: 'new_user_register_button' }