From b1381de587b273e1da54df17bbe5bc1e7679d292 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 11 Jan 2020 14:27:18 -0500 Subject: [PATCH] create gallery with the specified image as the cover --- lib/philomena_web/templates/gallery/_form.html.slime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/templates/gallery/_form.html.slime b/lib/philomena_web/templates/gallery/_form.html.slime index f68fa49a..416c2c9d 100644 --- a/lib/philomena_web/templates/gallery/_form.html.slime +++ b/lib/philomena_web/templates/gallery/_form.html.slime @@ -18,7 +18,7 @@ .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 + = 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 .field = label f, :order_position_asc, "Reverse gallery order (images will be inserted at the end of the gallery)"