26 lines
604 B
Elixir
26 lines
604 B
Elixir
<%= form_for @changeset, @action, [multipart: true], fn f -> %>
|
|
<%= 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 %>
|
|
|
|
|
|
<%= if @initial_file do %>
|
|
<label for="initial_file">File</label>
|
|
<input type="file" name="initial_file" id="initial_file">
|
|
<% end %>
|
|
|
|
<div>
|
|
<%= submit "Save" %>
|
|
</div>
|
|
<% end %>
|