Skip to content

Commit

Permalink
Phoenix: added view for /signup
Browse files Browse the repository at this point in the history
  • Loading branch information
williamn committed Nov 28, 2015
1 parent 587437b commit 6a6081d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions phoenix/notejam/web/controllers/users_controller.ex
@@ -0,0 +1,7 @@
defmodule Notejam.UsersController do
use Notejam.Web, :controller

def new(conn, _params) do
render conn, "new.html"
end
end
1 change: 1 addition & 0 deletions phoenix/notejam/web/router.ex
Expand Up @@ -17,6 +17,7 @@ defmodule Notejam.Router do
pipe_through :browser # Use the default browser stack

get "/", NotesController, :index
get "/signup", UsersController, :new
end

# Other scopes may use custom stacks.
Expand Down
11 changes: 11 additions & 0 deletions phoenix/notejam/web/templates/users/new.html.eex
@@ -0,0 +1,11 @@
<div class="thirteen columns content-area">
<form class="offset-by-six sign-in">
<label for="email">Email</label>
<input type="text" id="email">
<label for="password">Password</label>
<input type="password" id="password">
<label for="confirm-password">Confirm password</label>
<input type="password" id="confirm-password">
<input type="submit" value="Sign Up"> or <a href='#'>Sign in</a>
</form>
</div>
3 changes: 3 additions & 0 deletions phoenix/notejam/web/views/users_view.ex
@@ -0,0 +1,3 @@
defmodule Notejam.UsersView do
use Notejam.Web, :view
end

0 comments on commit 6a6081d

Please sign in to comment.