From 89d3eccef3bd90661ec7c515e0ecfb5574652db5 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Wed, 16 Dec 2020 18:02:23 -0500 Subject: [PATCH] set lower limit on user pagination to 1 --- lib/philomena/users/user.ex | 4 ++-- lib/philomena_web/templates/setting/edit.html.slime | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/philomena/users/user.ex b/lib/philomena/users/user.ex index 1a085461..15782d23 100644 --- a/lib/philomena/users/user.ex +++ b/lib/philomena/users/user.ex @@ -330,8 +330,8 @@ defmodule Philomena.Users.User do ]) |> TagList.propagate_tag_list(:watched_tag_list, :watched_tag_ids) |> validate_inclusion(:theme, ~W(default dark red)) - |> validate_inclusion(:images_per_page, 15..50) - |> validate_inclusion(:comments_per_page, 15..100) + |> validate_inclusion(:images_per_page, 1..50) + |> validate_inclusion(:comments_per_page, 1..100) |> Search.validate_search(:watched_images_query_str, user, true) |> Search.validate_search(:watched_images_exclude_str, user, true) end diff --git a/lib/philomena_web/templates/setting/edit.html.slime b/lib/philomena_web/templates/setting/edit.html.slime index 790e1013..002c9bf3 100644 --- a/lib/philomena_web/templates/setting/edit.html.slime +++ b/lib/philomena_web/templates/setting/edit.html.slime @@ -65,7 +65,7 @@ h1 Content Settings .fieldlabel: i Display the newest comments at the top of the page. .field => label f, :images_per_page - => number_input f, :images_per_page, min: 15, max: 50, step: 1, class: "input" + => number_input f, :images_per_page, min: 1, max: 50, step: 1, class: "input" = error_tag f, :images_per_page .fieldlabel i @@ -73,7 +73,7 @@ h1 Content Settings ' For 1080p monitors, try 24. .field => label f, :comments_per_page - => number_input f, :comments_per_page, min: 15, max: 100, step: 1, class: "input" + => number_input f, :comments_per_page, min: 1, max: 100, step: 1, class: "input" = error_tag f, :comments_per_page .fieldlabel: i This is the number of comments per page that are displayed on image pages. .field