From 7fa749aa37d4b85c9495c533acc37ae83ebd271c Mon Sep 17 00:00:00 2001 From: igorSimash Date: Sun, 3 Nov 2024 00:18:52 +0200 Subject: [PATCH 1/2] added clear filters btn for ransack form --- app/views/account/shared/_search_form.html.erb | 1 + config/locales/en/layouts.yml | 1 + config/locales/uk/layouts.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/app/views/account/shared/_search_form.html.erb b/app/views/account/shared/_search_form.html.erb index c055dd228..12ab6be3a 100644 --- a/app/views/account/shared/_search_form.html.erb +++ b/app/views/account/shared/_search_form.html.erb @@ -2,5 +2,6 @@ <%= search_form_for(q, url: search_url, method: :get, class: "d-flex mb-5") do |f| %> <%= f.search_field search_attribute, placeholder: t(".search_placeholder"), class: "form-input me-2" %> <%= f.button t(".search_button"), class: "btn btn-blue px-4 items-center" %> + <%= link_to t(".clear_button"), search_url, class:"btn btn-grey px-4 items-center ml-2" %> <% end %> diff --git a/config/locales/en/layouts.yml b/config/locales/en/layouts.yml index e7ea8f9fb..c57da2cdd 100644 --- a/config/locales/en/layouts.yml +++ b/config/locales/en/layouts.yml @@ -14,3 +14,4 @@ en: search_form: search_placeholder: "Search" search_button: "Search" + clear_button: "Clear" diff --git a/config/locales/uk/layouts.yml b/config/locales/uk/layouts.yml index 08e8dcdb4..1779a014c 100644 --- a/config/locales/uk/layouts.yml +++ b/config/locales/uk/layouts.yml @@ -14,3 +14,4 @@ uk: search_form: search_placeholder: "Пошук" search_button: "Шукати" + clear_button: "Очистити" From d858f3e1851dd1bef62d8919279694684aab3c6b Mon Sep 17 00:00:00 2001 From: Ihor Simashko <52800298+igorSimash@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:10:43 +0200 Subject: [PATCH 2/2] Update app/views/account/shared/_search_form.html.erb Co-authored-by: Ivan Marynych <49816584+loqimean@users.noreply.github.com> --- app/views/account/shared/_search_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/account/shared/_search_form.html.erb b/app/views/account/shared/_search_form.html.erb index 12ab6be3a..736f31fbc 100644 --- a/app/views/account/shared/_search_form.html.erb +++ b/app/views/account/shared/_search_form.html.erb @@ -2,6 +2,6 @@ <%= search_form_for(q, url: search_url, method: :get, class: "d-flex mb-5") do |f| %> <%= f.search_field search_attribute, placeholder: t(".search_placeholder"), class: "form-input me-2" %> <%= f.button t(".search_button"), class: "btn btn-blue px-4 items-center" %> - <%= link_to t(".clear_button"), search_url, class:"btn btn-grey px-4 items-center ml-2" %> + <%= link_to t(".clear_button"), search_url, class: "btn btn-grey px-4 items-center ml-2" %> <% end %>