From 4701c9fb9356b4a9ec23234e75ba90e5d3397179 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Thu, 15 May 2025 10:42:59 -0500 Subject: [PATCH 1/2] CORE-986: Fix color contrast of signup heading [CORE-986] New color contrast ratio is 5. Also moved the disabled-submit styling to CSS Also added some JS to control the disabled state of the Continue button on login. --- .../javascripts/newflow/newflow_ui.js.coffee | 6 ------ app/assets/stylesheets/newflow.scss | 6 ++++-- app/views/newflow/login/login_form.html.erb | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/newflow/newflow_ui.js.coffee b/app/assets/javascripts/newflow/newflow_ui.js.coffee index 0bbee6c45..9a0b9352c 100644 --- a/app/assets/javascripts/newflow/newflow_ui.js.coffee +++ b/app/assets/javascripts/newflow/newflow_ui.js.coffee @@ -2,17 +2,11 @@ NewflowUi = do () -> disableButton: (selector) -> $(selector).attr('disabled', 'disabled') $(selector).addClass('ui-state-disabled ui-button-disabled') - $(selector).css({ - 'background': '#ccc', - 'box-shadow': 'none', - 'color': '#666' - }) enableButton: (selector) -> $(selector).removeAttr('disabled') $(selector).removeClass('ui-state-disabled ui-button-disabled') $(selector).button() - $(selector).css({ 'background': '', 'box-shadow': '', 'color': '' }) renderAndOpenDialog: (html_id, content, modal_options = {}) -> if $('#' + html_id).exists() then $('#' + html_id).remove() diff --git a/app/assets/stylesheets/newflow.scss b/app/assets/stylesheets/newflow.scss index 0b20232a7..9377cfce8 100644 --- a/app/assets/stylesheets/newflow.scss +++ b/app/assets/stylesheets/newflow.scss @@ -644,7 +644,7 @@ $very-narrow: 37rem * $scale-factor; padding-right: 0; background-color: #f1f1f1; - color: #c1c1c1; + color: #666666; @include title-font(2.4rem); text-align: center; @@ -744,10 +744,12 @@ $very-narrow: 37rem * $scale-factor; input[type=submit] { &:disabled { + background-color: #ccc; + box-shadow: none; + color: #666; opacity: 0.85; } - -webkit-appearance: none; border-radius: 0; } } diff --git a/app/views/newflow/login/login_form.html.erb b/app/views/newflow/login/login_form.html.erb index 3f7d141a7..d9082565f 100644 --- a/app/views/newflow/login/login_form.html.erb +++ b/app/views/newflow/login/login_form.html.erb @@ -93,7 +93,8 @@ <%= f.submit I18n.t(:"login_signup_form.continue_button"), disable_with: I18n.t(:"login_signup_form.continue_button"), class: 'primary', - data: { ga_category: 'Login', ga_action: 'Click', ga_label: 'Email' } + data: { ga_category: 'Login', ga_action: 'Click', ga_label: 'Email' }, + disabled: 'disabled' %> @@ -118,5 +119,18 @@ From 3753b5e4d882d03d3cde691cfb0a35092a03d889 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Thu, 26 Jun 2025 13:56:29 -0500 Subject: [PATCH 2/2] CORE-1047 Because this is so tiny, I'm rolling it in here. Fixes contrast of Show/Hide label (which is a problem when the input is in an error state - pink) --- app/assets/stylesheets/newflow.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/newflow.scss b/app/assets/stylesheets/newflow.scss index 9377cfce8..664e08fde 100644 --- a/app/assets/stylesheets/newflow.scss +++ b/app/assets/stylesheets/newflow.scss @@ -223,7 +223,7 @@ label.required::after { top: 3.7rem; right: 1.8rem; - color: #027EB5; + color: #0070af; font-weight: bold; cursor: pointer;