From 5b1989cbfc7249001b75aad7af25442e1b4cd102 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 15 Oct 2024 00:48:04 +0000 Subject: [PATCH] Merge in design from normal sign in page --- app/views/alerts/sessions/new.html.erb | 48 ++++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/app/views/alerts/sessions/new.html.erb b/app/views/alerts/sessions/new.html.erb index 5fa2c9419..788d077eb 100644 --- a/app/views/alerts/sessions/new.html.erb +++ b/app/views/alerts/sessions/new.html.erb @@ -1,27 +1,31 @@ <%# TODO: Obviously this needs to be made to look like the design %> -<%= render HeadingComponent.new(tag: :h1).with_content("Sign in to save this search") %> +
+ <%= render HeadingComponent.new(tag: :h1, extra_classes: "mt-20 mb-12 text-center") do %> + Sign in to save this search + <% end %> -

- Applications within <%= meters_in_words(@alert.radius_meters) %> of <%= @alert.address %> -

+

+ Applications within <%= meters_in_words(@alert.radius_meters) %> of <%= @alert.address %> +

-<%= form_with model: resource, url: session_path(resource_name) do |f| %> - <%# TODO: Add error display and styling %> -
-
- <%= f.label :email, "Your email", class: "mb-1 block" %> - <%= f.email_field :email, class: "block mb-5 w-full", placeholder: "your@email.com", autofocus: true, autocomplete: "email", required: true %> + <%= form_with model: resource, url: session_path(resource_name) do |f| %> + <%# TODO: Add error display and styling %> +
+
+ <%= f.label :email, "Your email", class: "mb-1 block" %> + <%= f.email_field :email, class: "block mb-5 w-full", placeholder: "your@email.com", autofocus: true, autocomplete: "email", required: true %> +
+
+ <%= f.label :password, class: "mb-1 block" %> + <%= f.password_field :password, class: "block mb-2 w-full", placeholder: "••••••••", autocomplete: "current-password", required: true %> + <%# link_to "Forgot your password?", new_password_path(resource_name), class: "text-xl text-navy font-light underline block mb-8" %> +
+ <%= f.hidden_field :remember_me, value: true %> + <%# TODO: Is there a neater / more sensible way to pass these parameters on? %> + <%= f.hidden_field :address, value: @alert.address %> + <%= f.hidden_field :radius_meters, value: @alert.radius_meters %> + <%= f.button "Sign in" %>
-
- <%= f.label :password, class: "mb-1 block" %> - <%= f.password_field :password, class: "block mb-2 w-full", placeholder: "••••••••", autocomplete: "current-password", required: true %> - <%# link_to "Forgot your password?", new_password_path(resource_name), class: "text-xl text-navy font-light underline block mb-8" %> -
- <%= f.hidden_field :remember_me, value: true %> - <%# TODO: Is there a neater / more sensible way to pass these parameters on? %> - <%= f.hidden_field :address, value: @alert.address %> - <%= f.hidden_field :radius_meters, value: @alert.radius_meters %> - <%= f.button "Sign in" %> -
-<% end %> + <% end %> +