From 5010c91c793e0c117862a6a65494bc418233fb02 Mon Sep 17 00:00:00 2001 From: Rebeka Dekany <50901361+rebekadekany@users.noreply.github.com> Date: Tue, 4 Mar 2025 13:43:00 +0100 Subject: [PATCH] Make the checkbox to readonly to preserve the Group plan value on form submission (#24004) GitOrigin-RevId: 555c69952d64e050f0f30669ee8d69a511f6a08d --- .../stylesheets/bootstrap-5/abstracts/mixins.scss | 5 +++++ .../stylesheets/bootstrap-5/components/form.scss | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/services/web/frontend/stylesheets/bootstrap-5/abstracts/mixins.scss b/services/web/frontend/stylesheets/bootstrap-5/abstracts/mixins.scss index b35dec6212..ce53fcfa23 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/abstracts/mixins.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/abstracts/mixins.scss @@ -204,3 +204,8 @@ color: $color; } } + +@mixin input-disabled-styles { + background-color: $input-disabled-bg; + border-color: $input-disabled-border-color; +} diff --git a/services/web/frontend/stylesheets/bootstrap-5/components/form.scss b/services/web/frontend/stylesheets/bootstrap-5/components/form.scss index c777258235..31b685de8a 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/components/form.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/components/form.scss @@ -24,11 +24,6 @@ } &:disabled { - @mixin input-disabled-styles { - background-color: $input-disabled-bg; - border-color: $input-disabled-border-color; - } - @include input-disabled-styles; &[type='checkbox']:indeterminate { @@ -73,6 +68,15 @@ } } +// Fake disabled checkbox style +.readonly-disabled-checkbox input.form-check-input { + @include input-disabled-styles; + + &:hover:not(:disabled):checked { + @include input-disabled-styles; + } +} + .form-switch { .form-check-input { --bs-form-check-bg: var(--bg-dark-tertiary);