From 9e99fa05c9e7d849a95d6faf6fa7a5d9988fc308 Mon Sep 17 00:00:00 2001 From: Emin Kocan Date: Thu, 27 Jun 2024 17:22:41 +0200 Subject: [PATCH] add _section_divider component utilizing hr tags --- app/views/sessions/new.html.erb | 14 +++----------- app/views/shared/_section_divider.html.erb | 5 +++++ app/views/users/new.html.erb | 14 +++----------- 3 files changed, 11 insertions(+), 22 deletions(-) create mode 100644 app/views/shared/_section_divider.html.erb diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 70839d160..57e6d014a 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -25,12 +25,8 @@
<% if @preferred_auth_provider %> <%= render :partial => "auth_providers" %> -
-
-
<%= t ".or" %>
-
-
- <% end %> + <%= render :partial => "shared/section_divider", :locals => { :text => t(".or") } %> +<% end %> <%= bootstrap_form_tag(:action => "login", :html => { :id => "login_form" }) do |f| %> <%= hidden_field_tag("referer", h(params[:referer]), :autocomplete => "off") %> @@ -57,11 +53,7 @@ <% end %> <% unless @preferred_auth_provider %> -
-
-
<%= t ".with external" %>
-
-
+ <%= render :partial => "shared/section_divider", :locals => { :text => t(".with external") } %> <%= render :partial => "auth_providers" %> <% end %>
diff --git a/app/views/shared/_section_divider.html.erb b/app/views/shared/_section_divider.html.erb new file mode 100644 index 000000000..ad6bffd9d --- /dev/null +++ b/app/views/shared/_section_divider.html.erb @@ -0,0 +1,5 @@ +
+ + <%= text %> + +
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index b618f3811..c0cef51d9 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -31,12 +31,8 @@ <% unless @preferred_auth_provider.nil? %> <%= render :partial => "auth_providers" %> -
-
-
<%= t ".or" %>
-
-
- <% end %> + <%= render :partial => "shared/section_divider", :locals => { :text => t(".or") } %> +<% end %> <% else %>

<%= t ".about.welcome" %>

<% end %> @@ -98,11 +94,7 @@ <% end %> <% if current_user.auth_uid.nil? and @preferred_auth_provider.nil? %> -
-
-
<%= t ".use external auth" %>
-
-
+ <%= render :partial => "shared/section_divider", :locals => { :text => t(".use external auth") } %> <%= render :partial => "auth_providers" %> <% end %> -- 2.39.5