frenzy/lib/frenzy_web/templates/account/show.html.eex

32 lines
892 B
Elixir

<h1>User Settings</h1>
<h2><%= @user.username %></h2>
<a href="<%= Routes.account_path(@conn, :change_password) %>" class="button">Change Password</a>
<a href="<%= Routes.account_path(@conn, :change_fever_password) %>" class="button">Change Fever Password</a>
<h2>Approved Clients</h2>
<table>
<tr>
<th>Client</th>
<th>Revoke Access</th>
</tr>
<%= for {approved, fervor} <- @clients do %>
<tr>
<td>
<%= if fervor.website do %>
<a href="<%= fervor.website %>"><%= fervor.client_name %></a>
<% else %>
<%= fervor.client_name %>
<% end %>
</td>
<td>
<%= form_tag Routes.account_path(@conn, :remove_client), method: :post do %>
<input type="hidden" name="client_id" value="<%= approved.client_id %>">
<%= submit "Revoke" %>
<% end %>
</td>
</tr>
<% end %>
</table>