Skip to content

Commit

Permalink
rename templates for clarity #63
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed May 7, 2020
1 parent c4781f5 commit a34f966
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/auth_web/controllers/auth_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ defmodule AuthWeb.AuthController do
IO.inspect(params, label: "params:197")
conn
|> assign(:action, Routes.auth_path(conn, :password_create))
|> render("password-prompt.html",
|> render("password_create.html",
changeset: Auth.Person.password_new_changeset(%{email: params["email"]}),
state: params["state"], # so we can redirect after creatig a password
email: AuthWeb.ApikeyController.encrypt_encode(params["email"])
Expand Down
22 changes: 22 additions & 0 deletions lib/auth_web/templates/auth/password_prompt.html.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div class="mw7-ns ph5-ns center pa3">
<div class="db">
<h1 class="tc">Please Create a New Password:</h1>

<%= form_for @changeset, @action, fn f -> %>
<%= password_input f, :password,
class: "db w-100 mt2 pa3 ba b--dark-grey f3"%>
<%= error_tag f, :password %>


<br />
<%= hidden_input f, :state, id: "state", value: @state %>
<%= hidden_input f, :email, id: "email", value: @email %>

<%= submit "Save Password",
class: "pointer ba border-box dwyl-bg-mint white pa3 ml1 mv1 f3
shadow-hover bg-animate hover-dwyl-teal-darkest no-underline db",
style: "margin:0 auto; border-color: #318d7b;"
%>
<% end %>
</div>
</div>

0 comments on commit a34f966

Please sign in to comment.