From db488c247ddea9fb4b547d696fdb0278c4908bd3 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 21 Dec 2020 21:08:54 -0600 Subject: [PATCH] ip bans: fix deleted field in /ip_bans search form. Fix the value not being remembered in the search form because we accidentally used `input_html` instead of `selected`. --- app/views/ip_bans/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/ip_bans/index.html.erb b/app/views/ip_bans/index.html.erb index b3bdf29db..326f356cc 100644 --- a/app/views/ip_bans/index.html.erb +++ b/app/views/ip_bans/index.html.erb @@ -7,7 +7,7 @@ <%= f.input :reason, input_html: { value: params[:search][:reason] } %> <%= f.input :creator_name, label: "Creator", input_html: { value: params[:search][:creator_name], "data-autocomplete": "user" } %> <%= f.input :category, collection: IpBan.categories, include_blank: true, selected: params[:search][:category] %> - <%= f.input :is_deleted, label: "Deleted?", collection: ["Yes", "No"], include_blank: true, input_html: { value: params[:search][:is_deleted] } %> + <%= f.input :is_deleted, label: "Status", collection: [["Active", "false"], ["Deleted", "true"]], include_blank: true, selected: params[:search][:is_deleted] %> <%= f.input :order, collection: [%w[Newest created_at], %w[Oldest created_at_asc], %w[Last\ Seen last_hit_at]], include_blank: true, selected: params[:search][:order] %> <%= f.submit "Search" %> <% end %>