This repository has been archived on 2023-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
temple/integration_test/temple_demo/lib/temple_demo_web/templates/post/form.html.exs
Mitchell Hanberg 9d05f74cdf
Properly emit boolean attributes (#139)
* Update some docs

* Properly emit boolean attributes.

* Account for quoted literals when compiling attributes

* Update changelog
2021-06-26 21:47:21 -04:00

32 lines
643 B
Elixir

c Form, changeset: @changeset, action: @action do
slot :f, %{f: f} do
if @changeset.action do
c Flash, type: :info do
p do: "Oops, something went wrong! Please check the errors below."
end
end
label f, :title
text_input f, :title
error_tag(f, :title)
label f, :body
textarea f, :body
error_tag(f, :body)
label f, :published_at
datetime_select f, :published_at
error_tag(f, :published_at)
label f, :author
text_input f, :author
error_tag(f, :author)
input type: "text", disabled: true, id: "disabled-input"
div do
submit "Save"
end
end
end