olvidar contraseña
This commit is contained in:
parent
eedaa8a439
commit
d22e2a9197
@ -61,6 +61,17 @@ body{
|
|||||||
height: max-content;
|
height: max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pw_forgot{
|
||||||
|
background-color: #297177;
|
||||||
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
height: max-content;
|
||||||
|
}
|
||||||
|
|
||||||
.auth_form{
|
.auth_form{
|
||||||
background-color: #297177;
|
background-color: #297177;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -316,7 +316,7 @@ defmodule DerivantesWeb.CoreComponents do
|
|||||||
name={@name}
|
name={@name}
|
||||||
value="true"
|
value="true"
|
||||||
checked={@checked}
|
checked={@checked}
|
||||||
class="rounded border-zinc-300 text-white focus:ring-0"
|
class="rounded border-zinc-300 text-[#297177] focus:ring-0 accent-[#297177]"
|
||||||
{@rest}
|
{@rest}
|
||||||
/>
|
/>
|
||||||
<%= @label %>
|
<%= @label %>
|
||||||
@ -426,6 +426,7 @@ defmodule DerivantesWeb.CoreComponents do
|
|||||||
slot :actions
|
slot :actions
|
||||||
|
|
||||||
def header(assigns) do
|
def header(assigns) do
|
||||||
|
IO.inspect(assigns)
|
||||||
~H"""
|
~H"""
|
||||||
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
|
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
|
||||||
<div>
|
<div>
|
||||||
@ -441,6 +442,30 @@ defmodule DerivantesWeb.CoreComponents do
|
|||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
Renders a header with title.
|
||||||
|
"""
|
||||||
|
attr :class, :string, default: nil
|
||||||
|
|
||||||
|
slot :inner_block, required: true
|
||||||
|
slot :subtitle
|
||||||
|
slot :actions
|
||||||
|
def header_SA(assigns) do
|
||||||
|
~H"""
|
||||||
|
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
|
||||||
|
<div>
|
||||||
|
<h1 class="text-3xl font-semibold leading-8 text-white mt-4">
|
||||||
|
<%= render_slot(@inner_block) %>
|
||||||
|
</h1>
|
||||||
|
<p :if={@subtitle != []} class="mt-6 text-md leading-6 text-white">
|
||||||
|
<%= render_slot(@subtitle) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex-none"><%= render_slot(@actions) %></div>
|
||||||
|
</header>
|
||||||
|
"""
|
||||||
|
end
|
||||||
|
|
||||||
@doc ~S"""
|
@doc ~S"""
|
||||||
Renders a table with generic styling.
|
Renders a table with generic styling.
|
||||||
|
|
||||||
|
@ -5,23 +5,26 @@ defmodule DerivantesWeb.UserForgotPasswordLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto max-w-sm pw_forgot">
|
||||||
<.header class="text-center">
|
<.header_SA class="text-center text-white">
|
||||||
Forgot your password?
|
<img src={~p"/images/sana_americano_logo.png"} alt="Sanatorio Americano Logo"/>
|
||||||
<:subtitle>We'll send a password reset link to your inbox</:subtitle>
|
<br>
|
||||||
</.header>
|
¿Olvidó su contraseña?
|
||||||
|
<:subtitle>Le enviaremos un link para reestablecerla.</:subtitle>
|
||||||
|
</.header_SA>
|
||||||
|
|
||||||
<.simple_form for={@form} id="reset_password_form" phx-submit="send_email">
|
<.simple_form for={@form} id="reset_password_form" phx-submit="send_email">
|
||||||
<.input field={@form[:email]} type="email" placeholder="Email" required />
|
<.input field={@form[:email]} type="email" placeholder="Email" required />
|
||||||
|
<br>
|
||||||
<:actions>
|
<:actions>
|
||||||
<.button phx-disable-with="Sending..." class="w-full">
|
<.button phx-disable-with="Enviando..." class="w-full background-color-[#297177]">
|
||||||
Send password reset instructions
|
Enviar instrucciones de reestablecimiento de contraseña
|
||||||
</.button>
|
</.button>
|
||||||
</:actions>
|
</:actions>
|
||||||
</.simple_form>
|
</.simple_form>
|
||||||
<p class="text-center text-sm mt-4">
|
<p class="text-center text-sm mt-4">
|
||||||
<.link href={~p"/derivantes/register"}>Register</.link>
|
<.link href={~p"/derivantes/register"}>Registrarse</.link>
|
||||||
| <.link href={~p"/derivantes/log_in"}>Log in</.link>
|
| <.link href={~p"/derivantes/log_in"}>Ingresar</.link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
@ -40,7 +43,7 @@ defmodule DerivantesWeb.UserForgotPasswordLive do
|
|||||||
end
|
end
|
||||||
|
|
||||||
info =
|
info =
|
||||||
"If your email is in our system, you will receive instructions to reset your password shortly."
|
"Su su email está en nuestro sistema, recibirá instrucciones para reestablecer su contraseña en unos minutos"
|
||||||
|
|
||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|
@ -31,7 +31,7 @@ defmodule DerivantesWeb.UserLoginLive do
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<:actions>
|
<:actions>
|
||||||
<.input field={@form[:remember_me]} type="checkbox" label="Mantenerme conectado" class="accent-[#297177]"/>
|
<.input field={@form[:remember_me]} type="checkbox" label="Mantenerme conectado"/>
|
||||||
<.link href={~p"/derivantes/reset_password"} class="text-sm text-white font-semibold">
|
<.link href={~p"/derivantes/reset_password"} class="text-sm text-white font-semibold">
|
||||||
¿Olvidó su contraseña?
|
¿Olvidó su contraseña?
|
||||||
</.link>
|
</.link>
|
||||||
|
@ -5,8 +5,9 @@ defmodule DerivantesWeb.UserResetPasswordLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto max-w-sm pw_forgot">
|
||||||
<.header class="text-center">Reset Password</.header>
|
<img src={~p"/images/sana_americano_logo.png"} alt="Sanatorio Americano Logo"/>
|
||||||
|
<.header_SA class="text-center">Reestablecer contraseña.</.header_SA>
|
||||||
|
|
||||||
<.simple_form
|
<.simple_form
|
||||||
for={@form}
|
for={@form}
|
||||||
@ -15,24 +16,25 @@ defmodule DerivantesWeb.UserResetPasswordLive do
|
|||||||
phx-change="validate"
|
phx-change="validate"
|
||||||
>
|
>
|
||||||
<.error :if={@form.errors != []}>
|
<.error :if={@form.errors != []}>
|
||||||
Oops, something went wrong! Please check the errors below.
|
Ups!, Algo salió mal.
|
||||||
</.error>
|
</.error>
|
||||||
|
|
||||||
<.input field={@form[:password]} type="password" label="New password" required />
|
<.input field={@form[:password]} type="password" placeholder="Nueva contraseña" required />
|
||||||
<.input
|
<.input
|
||||||
field={@form[:password_confirmation]}
|
field={@form[:password_confirmation]}
|
||||||
type="password"
|
type="password"
|
||||||
label="Confirm new password"
|
placeholder="Repetir nueva contraseña"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
<br>
|
||||||
<:actions>
|
<:actions>
|
||||||
<.button phx-disable-with="Resetting..." class="w-full">Reset Password</.button>
|
<.button phx-disable-with="Resetting..." class="w-full">Reestablecer contraseña</.button>
|
||||||
</:actions>
|
</:actions>
|
||||||
</.simple_form>
|
</.simple_form>
|
||||||
|
|
||||||
<p class="text-center text-sm mt-4">
|
<p class="text-center text-sm mt-4">
|
||||||
<.link href={~p"/derivantes/register"}>Register</.link>
|
<.link href={~p"/derivantes/register"}>Registrarse</.link>
|
||||||
| <.link href={~p"/derivantes/log_in"}>Log in</.link>
|
| <.link href={~p"/derivantes/log_in"}>Ingresar</.link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user