diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.css new file mode 100644 index 0000000000..44ea312716 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.css @@ -0,0 +1,10 @@ +#signals-form-card #mc_embed_signup span.asterisk { + font-size: 1rem; + font-weight: normal; + color: #F2645A; +} +#signals-form-card #mc_embed_signup #mc-embedded-subscribe:disabled, +#signals-form-card #mc_embed_signup #mc-embedded-subscribe.disabled { + background-color: #4B5563; + border-color: #4B5563; +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.js index f8ce10af1f..54f0a24ef2 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.js +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/landing_pages/hdx_signals.js @@ -2,6 +2,7 @@ $(document).ready(function () { var $form = $('#signals-form-card form'); var $button = $form.find('#mc-embedded-subscribe'); + var $alert = $form.find('#mc-embedded-subscribe-alert'); var $fields = $form.find('#mce-EMAIL, #mce-FNAME, #mce-ORG'); var DATASETS_GROUPS = [ @@ -113,9 +114,11 @@ $(document).ready(function () { if(dataset_checked && location_checked && fields_filled) { $button.removeClass('disabled').removeAttr('disabled'); + $alert.addClass('d-none'); } else { $button.addClass('disabled').attr('disabled', 'disabled'); + $alert.removeClass('d-none'); } } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml index d7079e8dbe..a6846a994f 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/webassets.yml @@ -215,6 +215,12 @@ hdx-signals-scripts: - bs_tooltip.js - landing_pages/hdx_signals.js +hdx-signals-styles: + output: ckanext-hdx_theme/%(version)s_hdx-signals-styles.css + <<: *common-css + contents: + - landing_pages/hdx_signals.css + hdx-form-validator: <<: *common-js output: ckanext-hdx_theme/%(version)s_hdx-form-validator.js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/landing_pages/hdx_signals.less b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/landing_pages/hdx_signals.less new file mode 100644 index 0000000000..c79c48c9b6 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/hdx-styles/src/common/less/landing_pages/hdx_signals.less @@ -0,0 +1,21 @@ +@import "../bem.blocks/bem_variables"; + +#signals-form-card { + #mc_embed_signup { + span { + &.asterisk { + font-size: 1rem; + font-weight: normal; + color: @red-color; + } + } + + #mc-embedded-subscribe { + &:disabled, + &.disabled { + background-color: @grey-extra-dark-color; + border-color: @grey-extra-dark-color; + } + } + } +} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html index b9724940eb..836d440985 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/landing_pages/signals.html @@ -5,6 +5,11 @@ {% asset 'hdx_theme/hdx-signals-scripts' %} {% endblock %} +{% block styles %} + {{ super() }} + {% asset 'hdx_theme/hdx-signals-styles' %} +{% endblock %} + {% set CONST = h.HDX_CONST('UI_CONSTANTS')['LANDING_PAGES']['SIGNALS_LANDING_PAGE'] %} {% block subtitle %}{{ _('HDX Signals') }}{% endblock %} @@ -64,7 +69,7 @@ required="" value="">
- {{ h.snippet('bem.blocks/paragraph.html', text='Step 1: Datasets of interest', paragraph_classes=["paragraph__text_font-size-medium", "fw-bold", "mb-0"]) }} + {{ h.snippet('bem.blocks/paragraph.html', text='Step 1: Datasets of interest *', paragraph_classes=["paragraph__text_font-size-medium", "fw-bold", "mb-0"]) }}

- {{ h.snippet('bem.blocks/paragraph.html', text='Step 2: Locations of interest', paragraph_classes=["paragraph__text_font-size-medium", "fw-bold", "mb-0"]) }} + {{ h.snippet('bem.blocks/paragraph.html', text='Step 2: Locations of interest *', paragraph_classes=["paragraph__text_font-size-medium", "fw-bold", "mb-0"]) }}

@@ -352,6 +357,9 @@

+