35 lines
691 B
Plaintext
35 lines
691 B
Plaintext
<div>
|
|
<h2><%= @title %></h2>
|
|
|
|
<.form
|
|
let={f}
|
|
for={@changeset}
|
|
id="post-form"
|
|
phx-target={@myself}
|
|
phx-change="validate"
|
|
phx-submit="save">
|
|
|
|
<%= label f, :title %>
|
|
<%= textarea f, :title %>
|
|
<%= error_tag f, :title %>
|
|
|
|
<%= label f, :body %>
|
|
<%= textarea f, :body %>
|
|
<%= error_tag f, :body %>
|
|
|
|
<%= live_file_input @uploads.upload %>
|
|
|
|
<%= for upload <- @uploads.upload.entries do %>
|
|
<div class="row">
|
|
<div class="column">
|
|
<%= live_img_preview upload, height: 80 %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div>
|
|
<%= submit "Save", phx_disable_with: "Saving..." %>
|
|
</div>
|
|
</.form>
|
|
</div>
|