1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/lib/chess_web/templates/profile/edit.html.eex
Dan Barber bc5c6c4f04
Add profile page to update name and email
* Also add ability to change password
2018-08-13 22:12:32 -04:00

29 lines
820 B
Elixir

<div class="form">
<h2><%= gettext "Profile" %></h2>
<%= form_for @changeset, profile_path(@conn, :update), [class: "update-profile"], fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>
<%= gettext "Oops, something went wrong! Please check the errors below." %>
</p>
</div>
<% end %>
<div class="form-group">
<div class="form-field">
<%= input f, :name %>
</div>
<div class="form-field">
<%= input f, :email, as: :email %>
</div>
<div class="form-field">
<%= link gettext("Change password"), to: password_path(@conn, :edit) %>
</div>
</div>
<div class="form-group">
<%= submit gettext("Update Profile"), class: "btn btn-primary" %>
</div>
<% end %>
</div>