42 lines
1.2 KiB
Elixir
42 lines
1.2 KiB
Elixir
<div class="box">
|
|
<%= form_for @changeset, @action, fn f -> %>
|
|
<%= if @changeset.action do %>
|
|
<div class="help is-danger">
|
|
<p>something went wrong (see below)</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="field">
|
|
<div class="control">
|
|
<%= textarea f, :value, required: true, class: "textarea", placeholder: "task", autocomplete: "off" %>
|
|
</div>
|
|
<%= error_tag f, :value %>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<%= label f, :due_at, class: "label" do %>
|
|
due (YYYY-MM-DD HH:MM:SS)
|
|
<% end %>
|
|
<div class="control">
|
|
<%= text_input f, :due_at, class: "input", placeholder: "YYYY-MM-DD HH:MM:SS", autocomplete: "off" %>
|
|
</div>
|
|
<%= error_tag f, :due_at %>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<%= label f, :finished_at, class: "label" do %>
|
|
<%= if is_nil(@task.finished_at) do %>
|
|
<%= checkbox f, :finished_at %>
|
|
<% else %>
|
|
<%= checkbox f, :finished_at, checked_value: @task.finished_at %>
|
|
<% end %>
|
|
finished
|
|
<% end %>
|
|
<%= error_tag f, :finished_at %>
|
|
</div>
|
|
|
|
<div class="control">
|
|
<%= submit "save", class: "button is-dark" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|