-
<%= t 'users.registrations.new.head_title' %>
-
- <%= form_for(:user, as: resource_name, url: registration_path(resource_name), html: { id: "sign-up-form" } ) do |f| %>
+ <%- if Rails.configuration.x.enable_user_registration && Rails.configuration.x.linkedin_signin_enabled && @oauth_authorize != true %>
+
+ <%= render partial: "users/shared/linkedin_sign_in_links", locals: { resource_name: resource_name } %>
+ <%= t("devise.sessions.new.or") %>
+
+ <% end -%>
-
- <%= f.label :full_name %>
- <%= f.text_field :full_name, autofocus: true, class: 'form-control' %>
-
+
+ <%= form_for(:user, as: resource_name, url: registration_path(resource_name), html: { id: "sign-up-form" } ) do |f| %>
-
- <%= f.label :email %>
- <%= f.email_field :email, class: 'form-control' %>
-
+
+ <%= f.label :full_name, t('users.registrations.new.full_name_label') %>
+ <%= f.text_field :full_name, autofocus: true, class: 'form-control sci-input-field' %>
+
-
- <%= f.label :password %>
- <% if @minimum_password_length %>
-
(<%= @minimum_password_length %> characters minimum)
+
+ <%= f.label :email, t('users.registrations.new.email_label') %>
+ <%= f.email_field :email, class: 'form-control sci-input-field' %>
+
+
+
+ <%= f.label :password, t('users.registrations.new.password_label') %>
+ <% if @minimum_password_length %>
+ <%= t('users.registrations.new.minimum_password_length', password_length: @minimum_password_length) %>
+ <% end %>
+ <%= f.password_field :password, autocomplete: 'off', class: 'form-control sci-input-field' %>
+
+
+
+ <%= f.label :password_confirmation, t('users.registrations.new.password_confirmation_label') %>
+ <%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control sci-input-field' %>
+
+ <% if Rails.configuration.x.new_team_on_signup %>
+
+ <%= label :team, :name, t('users.registrations.new.team_name_label') %>
+ <% if @team %>
+ <%= text_field :team, :name, class: 'form-control sci-input-field', value: @team.name,
+ placeholder: t('users.registrations.new.team_name_placeholder') %>
+ <% else %>
+ <%= text_field :team, :name, class: 'form-control sci-input-field',
+ placeholder: t('users.registrations.new.team_name_placeholder') %>
+ <% end %>
+
+ <% end %>
+ <%= recaptcha_input_tag %>
+
+
+ <%= f.submit 'Sign up', class: 'btn btn-primary sign-up-button' %>
+
<% end %>
- <%= f.password_field :password, autocomplete: 'off', class: 'form-control' %>
+
+ <%= render partial: 'users/shared/links', locals: {linkedin_skip: true} %>
-
-
- <%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control' %>
-
- <% if Rails.configuration.x.new_team_on_signup %>
-
- <%= label :team, :name, t('users.registrations.new.team_name_label') %>
- <% if @team %>
- <%= text_field :team, :name, class: 'form-control', value: @team.name,
- placeholder: t('users.registrations.new.team_name_placeholder') %>
- <% else %>
- <%= text_field :team, :name, class: 'form-control',
- placeholder: t('users.registrations.new.team_name_placeholder') %>
- <% end %>
- <%= t 'users.registrations.new.team_name_help' %>
-
- <% end %>
- <%= recaptcha_input_tag %>
-
-
- <%= f.submit 'Sign up', class: 'btn btn-primary' %>
-
- <% end %>
- <%= render 'users/shared/links' %>
<% if resource and not resource.errors.empty? %>
diff --git a/app/views/users/sessions/new.html.erb b/app/views/users/sessions/new.html.erb
index 166515060..9d162a5a3 100644
--- a/app/views/users/sessions/new.html.erb
+++ b/app/views/users/sessions/new.html.erb
@@ -1,36 +1,46 @@
<% provide(:head_title, t("devise.sessions.new.head_title")) %>
+<% content_for(:body_class, 'sign-in-layout') %>
+
+
\ No newline at end of file
diff --git a/app/views/users/shared/_linkedin_sign_in_links.html.erb b/app/views/users/shared/_linkedin_sign_in_links.html.erb
new file mode 100644
index 000000000..127db89aa
--- /dev/null
+++ b/app/views/users/shared/_linkedin_sign_in_links.html.erb
@@ -0,0 +1,10 @@
+<%- if devise_mapping.omniauthable? && resource_class.omniauth_providers.any? %>
+ <%= link_to omniauth_authorize_path(resource_name, :linkedin), method: :post, title: "Sign in with LinkedIn", class: 'linkedin-link' do %>
+ <%= image_tag('linkedin/Sign-in-Large---Default.png',
+ class: 'linkedin-signin-button',
+ alt: "Sign in with LinkedIn",
+ onmouseover: "src='#{image_path('linkedin/Sign-in-Large---Hover.png')}'",
+ onmouseout: "src='#{image_path('linkedin/Sign-in-Large---Default.png')}'",
+ onclick: "src='#{image_path('linkedin/Sign-in-Large---Active.png')}'") %>
+ <% end -%>
+<% end -%>
\ No newline at end of file
diff --git a/app/views/users/shared/_links.html.erb b/app/views/users/shared/_links.html.erb
index 5770842f7..11b16ffd5 100644
--- a/app/views/users/shared/_links.html.erb
+++ b/app/views/users/shared/_links.html.erb
@@ -5,12 +5,12 @@
<%= link_to login, new_session_path(resource_name) %>
<% end -%>
- <%- if devise_mapping.registerable? && Rails.configuration.x.enable_user_registration && controller_name != 'registrations' %>
- <%= link_to t("devise.links.signup"), new_registration_path(resource_name) %>
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
+ <%= link_to t("devise.links.forgot"), new_password_path(resource_name), class: 'forgot-password-link' %>
<% end -%>
- <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
- <%= link_to t("devise.links.forgot"), new_password_path(resource_name) %>
+ <%- if devise_mapping.registerable? && Rails.configuration.x.enable_user_registration && controller_name != 'registrations' %>
+ <%= link_to t("devise.links.signup"), new_registration_path(resource_name), class: 'signup-link' %>
<% end -%>
<%- if Rails.configuration.x.enable_email_confirmations && devise_mapping.confirmable? && controller_name != 'confirmations' %>
@@ -25,16 +25,9 @@
<% end -%>
- <%- if Rails.configuration.x.enable_user_registration && Rails.configuration.x.linkedin_signin_enabled && @oauth_authorize != true %>
- <%- if devise_mapping.omniauthable? && resource_class.omniauth_providers.any? && controller_name != 'registrations' %>
- <%= link_to omniauth_authorize_path(resource_name, :linkedin), method: :post, :title => "Sign in with LinkedIn" do %>
- <%= image_tag('linkedin/Sign-in-Large---Default.png',
- class: 'linkedin-signin-button',
- alt: "Sign in with LinkedIn",
- onmouseover: "src='#{image_path('linkedin/Sign-in-Large---Hover.png')}'",
- onmouseout: "src='#{image_path('linkedin/Sign-in-Large---Default.png')}'",
- onclick: "src='#{image_path('linkedin/Sign-in-Large---Active.png')}'") %>
- <% end -%>
+ <%- unless defined?(linkedin_skip) %>
+ <%- if Rails.configuration.x.enable_user_registration && Rails.configuration.x.linkedin_signin_enabled && @oauth_authorize != true %>
+ <%= render partial: "users/shared/linkedin_sign_in_links", locals: { resource_name: resource_name } %>
<% end -%>
<% end -%>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f29d5e21f..7781bb3f4 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -19,15 +19,19 @@ en:
new:
head_title: "Forgot password"
title: "Forgot your password?"
- submit: "Send me reset password instructions"
+ submit: "Reset password"
registrations:
password_changed: "Password successfully updated."
sessions:
new:
head_title: "Log in"
title: "Log in"
- email_placeholder: "username@email.com"
- password_placeholder: "pass****"
+ or: "OR"
+ email_field: "E-mail"
+ email_placeholder: "john.doe@email.com"
+ password_field: "Password"
+ password_placeholder: "Enter password"
+ remember_me: "Remember me"
submit: "Log in"
create:
team_name: "%{user}'s projects"
@@ -1535,7 +1539,12 @@ en:
head_title: "Sign up"
team_name_label: "Team name"
team_name_placeholder: "e.g. John's lab"
- team_name_help: "This is the name of your lab or your group. You can invite other members to your team if needed."
+ email_label: "E-mail"
+ full_name_label: "Full name"
+ password_label: "Password"
+ minimum_password_length: "(%{password_length} characters minimum)"
+ password_confirmation_label: "Password confirmation"
+ captcha_description: "Let us know you’re human. Enter the captcha below."
new_with_provider:
head_title: "Complete the Sign up"
statistics:
diff --git a/features/sessions/forgot_password.feature b/features/sessions/forgot_password.feature
index cf2365008..beb00b466 100644
--- a/features/sessions/forgot_password.feature
+++ b/features/sessions/forgot_password.feature
@@ -14,14 +14,14 @@ Background:
Scenario: User forgot their password and requests for new password
Given I am on reset password page
Then I fill in "nonadmin@myorg.com" in "#user_email" field
- And I click "Send me reset password instruction" button
+ And I click "Reset password" button
Then I should see "You will receive an email with instructions on how to reset your password in a few minutes." flash message
@javascript
Scenario: User forgot their password and enters non valid email
Given I am on reset password page
Then I fill in "nonuser@myorg.com" in "#user_email" field
- And I click "Send me reset password instruction" button
+ And I click "Reset password" button
Then I should see "Email not found"
@javascript
diff --git a/features/sessions/sign_up.feature b/features/sessions/sign_up.feature
index 759b19213..0a5840ab5 100644
--- a/features/sessions/sign_up.feature
+++ b/features/sessions/sign_up.feature
@@ -14,7 +14,7 @@ Feature: Sign up
Scenario: Sign up for an existing user
Given I visit the sign up page
Then I fill the sign up form with
- | Full name | Email | Password | Password confirmation | Team name |
+ | Full name | E-mail | Password | Password confirmation | Team name |
| Magnus | tusk@gmail.com | asdf1234 | asdf1234 | SpliceGirls |
And I click on "Sign up"
Then I should see "has already been taken"
@@ -23,7 +23,7 @@ Feature: Sign up
Scenario: Sign up for an non-existent user
Given I visit the sign up page
Then I fill the sign up form with
- | Full name | Email | Password | Password confirmation | Team name |
+ | Full name | E-mail | Password | Password confirmation | Team name |
| Magnus | magnus@gmail.com | asdf1234 | asdf1234 | SpliceGirls |
And I click on "Sign up"
Then I should be on homepage
@@ -32,7 +32,7 @@ Feature: Sign up
Scenario: Unsuccessful sign up, password confirmation does not match
Given I visit the sign up page
Then I fill the sign up form with
- | Full name | Email | Password | Password confirmation | Team name |
+ | Full name | E-mail | Password | Password confirmation | Team name |
| Magnus | magnus@gmail.com | asdf1234 | asdf1234567 | SpliceGirls |
And I click on "Sign up"
Then I should see "doesn't match Password"
@@ -41,7 +41,7 @@ Feature: Sign up
Scenario: Unsuccessful sign up, team name is missing
Given I visit the sign up page
Then I fill the sign up form with
- | Full name | Email | Password | Password confirmation |
+ | Full name | E-mail | Password | Password confirmation |
| Magnus | magnus@gmail.com | asdf1234 | asdf1234 |
And I click on "Sign up"
Then I should see "is too short (minimum is 2 characters)"
diff --git a/features/step_definitions/users_steps.rb b/features/step_definitions/users_steps.rb
index 633fbba2a..a6efd263d 100644
--- a/features/step_definitions/users_steps.rb
+++ b/features/step_definitions/users_steps.rb
@@ -36,7 +36,7 @@ end
Given("I click on Reset Password link in the reset password email for user {string}") do |email|
visit new_user_password_path
fill_in 'user_email', with: email
- click_button 'Send me reset password instruction'
+ click_button 'Reset password'
Delayed::Worker.new.work_off
sleep 1