Skip to content

Commit

Permalink
requires autoform to create the emotion logging forms #7
Browse files Browse the repository at this point in the history
  • Loading branch information
RobStallion committed Oct 15, 2018
1 parent 8d142f0 commit 746fa5f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/afc_web/templates/emotion/captured.html.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="w-90 bg-white center br2 pa3 mb5">
<p class="tc b f4 mv4">Well done</p>
<p class="tc mb3">Today's log has been completed.</p>
<p class="tc mb5">Do you want to share it with someone?</p>
<p class="tc">no yes</p>
</div>
3 changes: 3 additions & 0 deletions lib/afc_web/templates/emotion/form.html.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="w-90 bg-white center br2 pa3 mb5">
<%= render_autoform(@conn, :create, @module, assigns: [changeset: @changeset]) %>
</div>
5 changes: 5 additions & 0 deletions lib/afc_web/views/emotion_view.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defmodule AfcWeb.EmotionView do
use AfcWeb, :view
use Autoform
alias Afc.{Angry, Happy}
end
1 change: 1 addition & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ defmodule Afc.Mixfile do
{:cowboy, "~> 1.0"},
{:excoveralls, "~> 0.10", only: :test},
{:credo, "~> 0.10.0", only: [:dev, :test], runtime: false},
{:autoform, github: "dwyl/autoform"}
]
end

Expand Down
1 change: 1 addition & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%{
"autoform": {:git, "https://github.com/dwyl/autoform.git", "eaa1d76e858d1ed5b042270c821e14932ba470e3", []},
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"},
"certifi": {:hex, :certifi, "2.4.2", "75424ff0f3baaccfd34b1214184b6ef616d89e420b258bb0a5ea7d7bc628f7f0", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"},
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"},
Expand Down

0 comments on commit 746fa5f

Please sign in to comment.