wiki/lib/wiki_web/templates/page/form.html.eex

26 lines
604 B
Elixir
Raw Normal View History

2020-08-02 23:40:45 +00:00
<%= form_for @changeset, @action, [multipart: true], fn f -> %>
2020-07-30 00:49:51 +00:00
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= label f, :title %>
<%= text_input f, :title %>
<%= error_tag f, :title %>
<%= label f, :content %>
<%= textarea f, :content %>
<%= error_tag f, :content %>
2020-08-02 23:40:45 +00:00
<%= if @initial_file do %>
<label for="initial_file">File</label>
<input type="file" name="initial_file" id="initial_file">
<% end %>
2020-07-30 00:49:51 +00:00
<div>
<%= submit "Save" %>
</div>
<% end %>