Commit 4c6591c9 authored by Stan Hu's avatar Stan Hu

Make sign-up form retain fields after failed CAPTCHA test

parent 6f0ee5c9
...@@ -6,17 +6,18 @@ ...@@ -6,17 +6,18 @@
.login-heading .login-heading
%h3 Create an account %h3 Create an account
.login-body .login-body
- user = params[:user].present? ? params[:user] : {}
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
.devise-errors .devise-errors
= devise_error_messages! = devise_error_messages!
%div %div
= f.text_field :name, class: "form-control top", placeholder: "Name", required: true = f.text_field :name, class: "form-control top", value: user[:name], placeholder: "Name", required: true
%div %div
= f.text_field :username, class: "form-control middle", placeholder: "Username", required: true = f.text_field :username, class: "form-control middle", value: user[:username], placeholder: "Username", required: true
%div %div
= f.email_field :email, class: "form-control middle", placeholder: "Email", required: true = f.email_field :email, class: "form-control middle", value: user[:email], placeholder: "Email", required: true
.form-group.append-bottom-20#password-strength .form-group.append-bottom-20#password-strength
= f.password_field :password, class: "form-control bottom", id: "user_password_sign_up", placeholder: "Password", required: true = f.password_field :password, class: "form-control bottom", value: user[:password], id: "user_password_sign_up", placeholder: "Password", required: true
%div %div
- if Gitlab.config.recaptcha.enabled - if Gitlab.config.recaptcha.enabled
= recaptcha_tags = recaptcha_tags
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment