From 9a738c44328806fb6d002650604c8e64eeb627b4 Mon Sep 17 00:00:00 2001 From: Joshua Arts Date: Mon, 23 Jul 2018 11:46:53 -0400 Subject: [PATCH] add signup with provider buttons --- app/views/users/new.html.erb | 25 ++++++++++++++++++++----- config/locales/en.yml | 1 + 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 55f5d378..3e477cca 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,11 +1,26 @@
-
-
+
+
-
+

<%= t("signup.subtitle") %>

-
+
+ <% unless configured_providers.length.zero? %> + <% configured_providers.each do |provider| %> + <%= link_to omniauth_login_url(provider), class: "btn btn-pill btn-#{provider} btn-block" do %> +  <%= t("signup.with", provider: provider.capitalize) %> + <% end %> + <% end %> + +
+
+ + <%= t("modal.login.or") %> + +
+
+ <% end %> <%= form_for @user, url: create_user_path, method: :post do |f| %>
<%= f.label t("settings.account.fullname"), class: "form-label" %> @@ -29,7 +44,7 @@
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 0ac42048..66db4a18 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -118,6 +118,7 @@ en: password_confirm: Password Confirmation subtitle: Create an Account title: Signup + with: Signup with %{provider} terms: accept: I accept the terms and conditions. title: Terms and Conditions