37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
<h1>Register</h1>
|
|
|
|
<.form let={f} for={@changeset} action={Routes.user_registration_path(@conn, :create)}>
|
|
<%= if @changeset.action do %>
|
|
<div class="alert alert-danger">
|
|
<p>Oops, something went wrong! Please check the errors below.</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="form-group mt-2">
|
|
<%= label f, :email %>
|
|
<%= email_input f, :email, required: true, class: "form-control" %>
|
|
<%= error_tag f, :email %>
|
|
</div>
|
|
|
|
<div class="form-group mt-2">
|
|
<%= label f, :username %>
|
|
<%= text_input f, :username, required: true, class: "form-control" %>
|
|
<%= error_tag f, :username %>
|
|
</div>
|
|
|
|
<div class="form-group mt-2">
|
|
<%= label f, :password %>
|
|
<%= password_input f, :password, required: true, class: "form-control" %>
|
|
<%= error_tag f, :password %>
|
|
</div>
|
|
|
|
<div class="mt-2">
|
|
<%= submit "Register", class: "btn btn-primary" %>
|
|
</div>
|
|
</.form>
|
|
<hr>
|
|
<p>
|
|
<%= link "Log in", to: Routes.user_session_path(@conn, :new) %> |
|
|
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
|
|
</p>
|