From 3f29e9b22fc3eb549918f8093f605a1f552813a1 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Tue, 3 Dec 2024 14:32:49 +0100 Subject: [PATCH 1/4] fix: Move TOS error into P tag --- decidim-core/lib/decidim/legacy_form_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/lib/decidim/legacy_form_builder.rb b/decidim-core/lib/decidim/legacy_form_builder.rb index 613bf565797fa..efe0e84ee2a48 100644 --- a/decidim-core/lib/decidim/legacy_form_builder.rb +++ b/decidim-core/lib/decidim/legacy_form_builder.rb @@ -99,7 +99,7 @@ def error_for(attribute, options = {}) error_messages = object.errors[attribute].join(", ") error_messages = error_messages.html_safe if options[:html_safe_errors] - content_tag(:small, error_messages, + content_tag :p, content_tag(:small, error_messages, class: class_name.sub("is-invalid-input", "")) end From ebef478ca45d5a76360b63891568a57fd218bb95 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Tue, 3 Dec 2024 15:12:10 +0100 Subject: [PATCH 2/4] fix: Remove Size attribute from password field --- decidim-core/lib/decidim/form_builder.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/decidim-core/lib/decidim/form_builder.rb b/decidim-core/lib/decidim/form_builder.rb index 67302ef7a58de..adbdfb3d8ba4a 100644 --- a/decidim-core/lib/decidim/form_builder.rb +++ b/decidim-core/lib/decidim/form_builder.rb @@ -96,6 +96,7 @@ def password_field(attribute, options = {}) field attribute, options do |opts| opts[:autocomplete] ||= :off opts[:class] ||= "input-group-field" + opts[:size] = nil super(attribute, opts) end end From c0d9cf1cb078d4d41b0921a8bca1b7269db220af Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Tue, 3 Dec 2024 15:32:18 +0100 Subject: [PATCH 3/4] fix: contrast color in form error text --- decidim-core/lib/decidim/assets/tailwind/tailwind.config.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/lib/decidim/assets/tailwind/tailwind.config.js.erb b/decidim-core/lib/decidim/assets/tailwind/tailwind.config.js.erb index de70a9059a9b0..c55ee38f7849c 100644 --- a/decidim-core/lib/decidim/assets/tailwind/tailwind.config.js.erb +++ b/decidim-core/lib/decidim/assets/tailwind/tailwind.config.js.erb @@ -37,7 +37,7 @@ module.exports = { secondary: withOpacity("--secondary-rgb"), tertiary: withOpacity("--tertiary-rgb"), success: "#28A745", - alert: "#ED1C24", + alert: "#ad1419", warning: "#FFB703", black: "#020203", gray: { From e6bbd45b694504587d449e262587ae04a315c531 Mon Sep 17 00:00:00 2001 From: stephanie rousset Date: Tue, 3 Dec 2024 17:08:12 +0100 Subject: [PATCH 4/4] refactor: rubocop update --- decidim-core/lib/decidim/legacy_form_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decidim-core/lib/decidim/legacy_form_builder.rb b/decidim-core/lib/decidim/legacy_form_builder.rb index efe0e84ee2a48..64167c3e5d185 100644 --- a/decidim-core/lib/decidim/legacy_form_builder.rb +++ b/decidim-core/lib/decidim/legacy_form_builder.rb @@ -100,7 +100,7 @@ def error_for(attribute, options = {}) error_messages = object.errors[attribute].join(", ") error_messages = error_messages.html_safe if options[:html_safe_errors] content_tag :p, content_tag(:small, error_messages, - class: class_name.sub("is-invalid-input", "")) + class: class_name.sub("is-invalid-input", "")) end private