2019-12-05 01:11:31 +01:00
|
|
|
= form_for @changeset, @action, fn f ->
|
|
|
|
= if @changeset.action do
|
|
|
|
.alert.alert-danger
|
|
|
|
p Oops, something went wrong! Please check the errors below.
|
|
|
|
|
|
|
|
.field
|
|
|
|
= label f, :title, "Choose a title displayed in gallery preview"
|
|
|
|
= text_input f, :title, class: "input input--wide", placeholder: "Title", required: true
|
2019-12-05 06:06:07 +01:00
|
|
|
= error_tag f, :title
|
2019-12-05 01:11:31 +01:00
|
|
|
.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"
|
2019-12-05 06:06:07 +01:00
|
|
|
= error_tag f, :spoiler_warning
|
2019-12-05 01:11:31 +01:00
|
|
|
.field
|
|
|
|
= label :description, "Describe the gallery in a few words"
|
|
|
|
= textarea f, :description, class: "input input--wide", placeholder: "Description"
|
2019-12-05 06:06:07 +01:00
|
|
|
= error_tag f, :description
|
2019-12-05 01:11:31 +01:00
|
|
|
.field
|
|
|
|
= label f, :thumbnail_id, "Set an existing image as the gallery cover"
|
|
|
|
br
|
|
|
|
= number_input f, :thumbnail_id, class: "input", placeholder: "Image ID (e.g. 100)", min: 0
|
2019-12-05 06:06:07 +01:00
|
|
|
= error_tag f, :thumbnail_id
|
2019-12-05 01:11:31 +01:00
|
|
|
.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"
|
2019-12-05 06:06:07 +01:00
|
|
|
= error_tag f, :order_position_asc
|
2019-12-05 01:11:31 +01:00
|
|
|
.field
|
|
|
|
|
|
|
|
= submit "Save Gallery", class: "button"
|