From 508de353208bd3dfe3e7a71b991e831a117c7057 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 9 Jan 2017 19:10:15 +0100 Subject: [PATCH] polishes forms styles on devise views --- app/views/devise/_omniauth_form.html.erb | 24 +++++++++++-------- app/views/devise/confirmations/new.html.erb | 4 +++- app/views/devise/passwords/new.html.erb | 4 +++- app/views/devise/sessions/new.html.erb | 8 +++---- app/views/layouts/devise.html.erb | 2 +- .../organizations/registrations/new.html.erb | 5 ++-- app/views/users/registrations/new.html.erb | 5 ++-- 7 files changed, 31 insertions(+), 21 deletions(-) diff --git a/app/views/devise/_omniauth_form.html.erb b/app/views/devise/_omniauth_form.html.erb index 5a9cca608..328a1ef1e 100644 --- a/app/views/devise/_omniauth_form.html.erb +++ b/app/views/devise/_omniauth_form.html.erb @@ -3,13 +3,13 @@ <% if current_page?(new_user_session_path) %>
-
+
<%= t("omniauth.info_sign_in") %>
<% if feature? :twitter_login %> -
+
<%= link_to t("omniauth.twitter.name"), user_omniauth_authorize_path(:twitter), title: t("omniauth.twitter.sign_in"), class: "button-twitter button expanded" %> @@ -17,7 +17,7 @@ <% end %> <% if feature? :facebook_login %> -
+
<%= link_to t("omniauth.facebook.name"), user_omniauth_authorize_path(:facebook), title: t("omniauth.facebook.sign_in"), class: "button-facebook button expanded" %> @@ -25,7 +25,7 @@ <% end %> <% if feature? :google_login %> -
+
<%= link_to t("omniauth.google_oauth2.name"), user_omniauth_authorize_path(:google_oauth2), title: t("omniauth.google_oauth2.sign_in"), class: "button-google button expanded" %> @@ -40,11 +40,13 @@ <% elsif current_page?(new_user_registration_path) %>
-

<%= t("omniauth.info_sign_up") %>

+
+ <%= t("omniauth.info_sign_up") %> +
<% if feature? :twitter_login %> -
+
<%= link_to t("omniauth.twitter.name"), user_omniauth_authorize_path(:twitter), title: t("omniauth.twitter.sign_up"), class: "button-twitter button expanded" %> @@ -52,7 +54,7 @@ <% end %> <% if feature? :facebook_login %> -
+
<%= link_to t("omniauth.facebook.name"), user_omniauth_authorize_path(:facebook), title: t("omniauth.facebook.sign_up"), class: "button-facebook button expanded" %> @@ -60,15 +62,17 @@ <% end %> <% if feature? :google_login %> -
+
<%= link_to t("omniauth.google_oauth2.name"), user_omniauth_authorize_path(:google_oauth2), title: t("omniauth.google_oauth2.sign_up"), class: "button-google button expanded" %>
<% end %> -
-
+
+ <%= t("omniauth.or_fill") %> +
+
<% end %> <% end %> diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 88016f5ce..fe2cf0dc5 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -15,7 +15,9 @@ <%= hidden_field_tag :confirmation_token,@confirmation_token %> - <%= f.submit(t("devise_views.confirmations.new.submit"), class: "button expanded") %> +
+ <%= f.submit(t("devise_views.confirmations.new.submit"), class: "button expanded") %> +
<% end %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 59608c148..72dd70fb9 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -7,7 +7,9 @@
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.passwords.new.email_label") %> - <%= f.submit t("devise_views.passwords.new.send_submit"), class: "button expanded" %> +
+ <%= f.submit t("devise_views.passwords.new.send_submit"), class: "button expanded" %> +
<% end %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 2abd9aebd..ad375e772 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -10,17 +10,17 @@ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
-
+
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.sessions.new.email_label"), tabindex: "1" %>
-
+
<%= link_to t("devise_views.shared.links.new_password"), new_password_path(resource_name), class: "float-right", tabindex: "3" %> <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.sessions.new.password_label"), tabindex: "2" %>
<% if devise_mapping.rememberable? -%> -
+
<%= f.label :remember_me do %> <%= f.check_box :remember_me, title: t('devise_views.sessions.new.remember_me'), label: false, tabindex: "4" %> <%= t("devise_views.sessions.new.remember_me") %> @@ -28,7 +28,7 @@
<% end -%> -
+
<%= f.submit(t("devise_views.sessions.new.submit"), class: "button expanded") %>
diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb index f7e1a820e..a0e9eaaff 100644 --- a/app/views/layouts/devise.html.erb +++ b/app/views/layouts/devise.html.erb @@ -25,7 +25,7 @@
-
+
<%= render 'layouts/flash' %> diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb index 3b1763e83..e85bb5408 100644 --- a/app/views/organizations/registrations/new.html.erb +++ b/app/views/organizations/registrations/new.html.erb @@ -33,8 +33,9 @@ terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", title: t('shared.target_blank_html'), target: "_blank")).html_safe %> <% end %> - - <%= f.submit t("devise_views.organizations.registrations.new.submit"), class: "button expanded" %> +
+ <%= f.submit t("devise_views.organizations.registrations.new.submit"), class: "button expanded" %> +
<% end %> diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index f2f1827ba..1c6f81455 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -46,8 +46,9 @@ target: "_blank")).html_safe %> <% end %> - - <%= f.submit t("devise_views.users.registrations.new.submit"), class: "button expanded" %> +
+ <%= f.submit t("devise_views.users.registrations.new.submit"), class: "button expanded" %> +
<% end %>