<%= form_with model: figure, scope: :item, url: path do |form| %> <%= render "hidden_fields", form: %> <%= render "form_errors", form: %>
<%= form.label :image %> <% if (image = form.object.image).attached? %> <%= image.filename %>
<%= form.hidden_field :image, value: form.object.image.signed_id %> <% end %> <%= form.file_field :image %>
<%= form.label :heading %> <%= form.text_field :heading %>
<%= form.label :background %> <%= form.select :background, Katalyst::Content.config.backgrounds %>
<%= form.label :visible %> <%= form.check_box :visible %>
<%= form.label :caption %> <%= form.text_field :caption %>
<%= form.submit "Done" %> <%= link_to "Discard", :back %> <% end %>