mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-01 07:18:00 +01:00
38 lines
1.7 KiB
Text
38 lines
1.7 KiB
Text
|
<%= form_for @changeset, @action, fn f -> %>
|
||
|
<%= if @changeset.action do %>
|
||
|
<div class="alert alert-danger">
|
||
|
<p>
|
||
|
Oops, something went wrong! Please check the errors below.
|
||
|
</p>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<div class="field">
|
||
|
<%= label(f, :title, "Choose a title displayed in gallery preview") %>
|
||
|
<%= text_input(f, :title, class: "input input--wide", placeholder: "Title", required: true) %>
|
||
|
<%= error_tag(f, :title) %>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<%= label(f, :spoiler_warning, "If you are going to have NSFW images in the gallery, leave a warning for users who may not want to see it") %>
|
||
|
<%= text_input(f, :spoiler_warning, class: "input input--wide", placeholder: "Spoiler warning") %>
|
||
|
<%= error_tag(f, :spoiler_warning) %>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<%= label(:description, "Describe the gallery in a few words") %>
|
||
|
<%= textarea(f, :description, class: "input input--wide", placeholder: "Description") %>
|
||
|
<%= error_tag(f, :description) %>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<%= label(f, :thumbnail_id, "Set an existing image as the gallery cover") %>
|
||
|
<br />
|
||
|
<%= number_input(f, :thumbnail_id, value: input_value(f, :thumbnail_id) || @conn.params["with_image"], class: "input", placeholder: "Image ID (e.g. 100)", min: 0) %>
|
||
|
<%= error_tag(f, :thumbnail_id) %>
|
||
|
</div>
|
||
|
<div class="field">
|
||
|
<%= label(f, :order_position_asc, "Reverse gallery order (images will be inserted at the end of the gallery)") %>
|
||
|
<%= checkbox(f, :order_position_asc, class: "checkbox") %>
|
||
|
<%= error_tag(f, :order_position_asc) %>
|
||
|
</div>
|
||
|
<div class="field"></div>
|
||
|
<%= submit("Save Gallery", class: "button") %>
|
||
|
<% end %>
|