Skip to content
Permalink
Browse files

The Template

  • Loading branch information...
dnsbty committed Aug 18, 2019
1 parent 40c3110 commit 19683bca7ebec347b87764b5c1dcd5ba7e5653a0
@@ -1,11 +1,12 @@
defmodule UserAdminWeb.UserLive.New do
use Phoenix.LiveView
alias UserAdminWeb.UserView

def mount(_session, socket) do
{:ok, socket}
end

def render(assigns) do
~L""
UserView.render("new.html", assigns)
end
end
@@ -0,0 +1,17 @@
<h2>New User</h2>
<form>
<fieldset>
<label for="nameField">Name</label>
<input type="text" id="nameField">
<label for="roleField">Role</label>
<select id="roleField">
<option value="admin">Administrator</option>
<option value="mod">Moderator</option>
<option value="user">User</option>
<option value="guest">Guest</option>
</select>
<div>
<input type="submit" value="Create">
</div>
</fieldset>
</form>
@@ -0,0 +1,3 @@
defmodule UserAdminWeb.UserView do
use UserAdminWeb, :view
end

0 comments on commit 19683bc

Please sign in to comment.
You can’t perform that action at this time.