Login por matricula
This commit is contained in:
@ -14,11 +14,11 @@ defmodule DerivantesWeb.UserLoginLive do
|
||||
>
|
||||
<img src={~p"/images/sana_americano_logo.png"} alt="Sanatorio Americano Logo"/>
|
||||
<.input
|
||||
field={@form[:email]}
|
||||
type="email"
|
||||
field={@form[:matricula]}
|
||||
type="number"
|
||||
label=""
|
||||
class="imput_text"
|
||||
placeholder="Email"
|
||||
placeholder="Matrícula"
|
||||
required
|
||||
/>
|
||||
<.input
|
||||
@ -66,8 +66,8 @@ defmodule DerivantesWeb.UserLoginLive do
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
email = Phoenix.Flash.get(socket.assigns.flash, :email)
|
||||
form = to_form(%{"email" => email}, as: "user")
|
||||
matricula = Phoenix.Flash.get(socket.assigns.flash, :matricula)
|
||||
form = to_form(%{"matricula" => matricula}, as: "user")
|
||||
{:ok, assign(socket, form: form), temporary_assigns: [form: form]}
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user