diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 53af0de2d6..be0a6cc66d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -22,7 +22,7 @@ jobs: contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - uses: jwalton/gh-find-current-pr@v1 id: findPr @@ -79,12 +79,12 @@ jobs: # Maps tcp port 6379 on service container to the host - 6379:6379 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - uses: jwalton/gh-find-current-pr@v1 id: findPr - name: Clone API - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: GSA/notifications-api path: 'notifications-api' @@ -140,7 +140,7 @@ jobs: runs-on: ubuntu-latest environment: staging steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Validate NewRelic config env: @@ -153,7 +153,7 @@ jobs: dependency-audits: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Create requirements.txt run: poetry export --without-hashes --format=requirements.txt > requirements.txt @@ -166,7 +166,7 @@ jobs: static-scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Run scan run: poetry run bandit -r app/ --confidence-level medium @@ -174,7 +174,7 @@ jobs: dynamic-scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Run server run: make run-flask & @@ -193,7 +193,7 @@ jobs: a11y-scan: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Run server run: make run-flask & diff --git a/.github/workflows/daily_checks.yml b/.github/workflows/daily_checks.yml index babe60f444..a5e81a137b 100644 --- a/.github/workflows/daily_checks.yml +++ b/.github/workflows/daily_checks.yml @@ -22,7 +22,7 @@ jobs: dependency-audits: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Create requirements.txt run: poetry export --without-hashes --format=requirements.txt > requirements.txt @@ -35,7 +35,7 @@ jobs: static-scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Run scan run: poetry run bandit -r app/ --confidence-level medium @@ -43,7 +43,7 @@ jobs: dynamic-scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/setup-project - name: Run server run: make run-flask & diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 57f11acf92..dc725f1573 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest environment: demo steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 @@ -62,7 +62,7 @@ jobs: LOGIN_DOT_GOV_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&post_logout_redirect_uri=https://notify-demo.app.cloud.gov/sign-out" LOGIN_DOT_GOV_BASE_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?" LOGIN_DOT_GOV_SIGNOUT_REDIRECT: "https://notify-demo.app.cloud.gov/sign-out" - LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=01234567890123456789012345&prompt=select_account&redirect_uri=https://notify-demo.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=abcdefghijklmnopabcdefghijklmnop" + LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-demo.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=STATE" with: cf_username: ${{ secrets.CLOUDGOV_USERNAME }} cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 3e169cdc90..d614bf3091 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest environment: production steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 @@ -62,7 +62,7 @@ jobs: LOGIN_DOT_GOV_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&post_logout_redirect_uri=https://beta.notify.gov/sign-out" LOGIN_DOT_GOV_BASE_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?" LOGIN_DOT_GOV_SIGNOUT_REDIRECT: "https://beta.notify.gov/sign-out" - LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=01234567890123456789012345&prompt=select_account&redirect_uri=https://beta.notify.gov/sign-in&response_type=code&scope=openid+email&state=abcdefghijklmnopabcdefghijklmnop" + LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://beta.notify.gov/sign-in&response_type=code&scope=openid+email&state=STATE" with: cf_username: ${{ secrets.CLOUDGOV_USERNAME }} cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f620bd6625..d74ba3133d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: environment: staging steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 @@ -68,7 +68,7 @@ jobs: LOGIN_DOT_GOV_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&post_logout_redirect_uri=https://notify-staging.app.cloud.gov/sign-out" LOGIN_DOT_GOV_BASE_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?" LOGIN_DOT_GOV_SIGNOUT_REDIRECT: "https://notify-staging.app.cloud.gov/sign-out" - LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=01234567890123456789012345&prompt=select_account&redirect_uri=https://notify-staging.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=abcdefghijklmnopabcdefghijklmnop" + LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-staging.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=STATEE" with: cf_username: ${{ secrets.CLOUDGOV_USERNAME }} cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} diff --git a/.github/workflows/drift.yml b/.github/workflows/drift.yml index 616e72689e..5f495ceba4 100644 --- a/.github/workflows/drift.yml +++ b/.github/workflows/drift.yml @@ -13,7 +13,7 @@ jobs: environment: staging steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check for drift uses: dflook/terraform-check@v1 @@ -31,7 +31,7 @@ jobs: environment: demo steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: 'production' @@ -51,7 +51,7 @@ jobs: environment: production steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: 'production' diff --git a/.github/workflows/terraform-demo.yml b/.github/workflows/terraform-demo.yml index 29b8fa3971..765f9e53b1 100644 --- a/.github/workflows/terraform-demo.yml +++ b/.github/workflows/terraform-demo.yml @@ -16,7 +16,7 @@ jobs: environment: demo steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Terraform format id: format diff --git a/.github/workflows/terraform-production.yml b/.github/workflows/terraform-production.yml index afb10dcfbc..1988c5d95f 100644 --- a/.github/workflows/terraform-production.yml +++ b/.github/workflows/terraform-production.yml @@ -16,7 +16,7 @@ jobs: environment: production steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Terraform format id: format diff --git a/.github/workflows/terraform-staging.yml b/.github/workflows/terraform-staging.yml index b1ac54f8f6..1f86ee0336 100644 --- a/.github/workflows/terraform-staging.yml +++ b/.github/workflows/terraform-staging.yml @@ -16,7 +16,7 @@ jobs: environment: staging steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Terraform format id: format diff --git a/Makefile b/Makefile index aa9b404afc..21e39e844c 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ NVMSH := $(shell [ -f "$(HOME)/.nvm/nvm.sh" ] && echo "$(HOME)/.nvm/nvm.sh" || e bootstrap: generate-version-file ## Set up everything to run the app poetry self update poetry self add poetry-dotenv-plugin + poetry lock --no-update poetry install --sync --no-root poetry run playwright install --with-deps poetry run pre-commit install diff --git a/app/assets/images/product/security-review-message.png b/app/assets/images/product/security-review-message.png index ffb59076c8..cf2820d44f 100644 Binary files a/app/assets/images/product/security-review-message.png and b/app/assets/images/product/security-review-message.png differ diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 74441f0925..d66e276bdb 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -319,27 +319,15 @@ td.table-empty-message { .dashboard { .big-number-with-status { - a { - background: color("blue-60v"); - padding: units(2); - margin-bottom: units(1); - text-decoration: none; - &:hover{ - background: color("blue-warm-70v"); - } - } - span { - color: white; - } .big-number-smaller { display: flex; flex-direction: column; .big-number-number { font-size: units(5); - line-height: units(6); + line-height: units(5); } .big-number-label { - font-size: units(3); + font-size: units(2.5); } } .big-number-status { @@ -595,3 +583,9 @@ details form { #countdown-container { display: none; // Hide the countdown timer } + +.placeholder, .placeholder-conditional { + background-color: #face00; + border: 1px solid #face00; + border-radius: 7px; +} diff --git a/app/assets/sass/uswds/_uswds-theme.scss b/app/assets/sass/uswds/_uswds-theme.scss index b588e264d9..bc4b9b7336 100644 --- a/app/assets/sass/uswds/_uswds-theme.scss +++ b/app/assets/sass/uswds/_uswds-theme.scss @@ -9,5 +9,9 @@ in the form $setting: value, @use "uswds-core" with ( $theme-font-type-sans: "public-sans", - $theme-show-notifications: false + $theme-show-notifications: false, + $theme-banner-max-width: "desktop-lg", + $theme-grid-container-max-width: "desktop-lg", + $theme-footer-max-width: "desktop-lg", + $theme-header-max-width: "desktop-lg" ); diff --git a/app/config.py b/app/config.py index ba89ce6bfa..0a05908f51 100644 --- a/app/config.py +++ b/app/config.py @@ -38,11 +38,6 @@ class Config(object): NR_MONITOR_ON = settings and settings.monitor_mode COMMIT_HASH = getenv("COMMIT_HASH", "--------")[0:7] - TEMPLATE_PREVIEW_API_HOST = getenv( - "TEMPLATE_PREVIEW_API_HOST", "http://localhost:9999" - ) - TEMPLATE_PREVIEW_API_KEY = getenv("TEMPLATE_PREVIEW_API_KEY", "my-secret-key") - GOVERNMENT_EMAIL_DOMAIN_NAMES = ["gov"] # Logging diff --git a/app/formatters.py b/app/formatters.py index c63b14776b..2bb8854f37 100644 --- a/app/formatters.py +++ b/app/formatters.py @@ -22,7 +22,7 @@ from notifications_utils.take import Take from app.utils.csv import get_user_preferred_timezone -from app.utils.time import parse_naive_dt +from app.utils.time import parse_dt, parse_naive_dt def apply_html_class(tags, html_file): @@ -99,12 +99,10 @@ def format_datetime_table(date): def format_time_12h(date): - date = parse_naive_dt(date) + date = parse_dt(date) preferred_tz = pytz.timezone(get_user_preferred_timezone()) - return ( - date.replace(tzinfo=timezone.utc).astimezone(preferred_tz).strftime("%I:%M %p") - ) + return date.astimezone(preferred_tz).strftime("%I:%M %p") def format_datetime_relative(date): diff --git a/app/main/views/send.py b/app/main/views/send.py index 3aa5bd830f..78395d2435 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -470,7 +470,7 @@ def send_one_off_step(service_id, template_id, step_index): ) -def _check_messages(service_id, template_id, upload_id, preview_row): +def _check_messages(service_id, template_id, upload_id, preview_row, **kwargs): try: # The happy path is that the job doesn’t already exist, so the # API will return a 404 and the client will raise HTTPError. @@ -510,11 +510,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row): show_recipient=False, email_reply_to=email_reply_to, sms_sender=sms_sender, - ) - simplifed_template = get_template( - db_template, - current_service, - show_recipient=False, + **kwargs, ) allow_list = [] @@ -535,7 +531,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row): allow_list = None recipients = RecipientCSV( contents, - template=template or simplifed_template, + template=template, max_initial_rows_shown=50, max_errors_shown=50, guestlist=allow_list, @@ -569,9 +565,6 @@ def _check_messages(service_id, template_id, upload_id, preview_row): if preview_row < len(recipients) + 2: template.values = recipients[preview_row - 2].recipient_and_personalisation - simplifed_template.values = recipients[ - preview_row - 2 - ].recipient_and_personalisation elif preview_row > 2: abort(404) @@ -599,7 +592,6 @@ def _check_messages(service_id, template_id, upload_id, preview_row): service_id, template.id, db_template["version"], original_file_name ), template_id=template_id, - simplifed_template=simplifed_template, ) @@ -658,7 +650,7 @@ def check_messages(service_id, template_id, upload_id, row_index=2): @user_has_permissions("send_messages", restrict_admin_usage=True) def preview_job(service_id, template_id, upload_id, row_index=2): session["scheduled_for"] = request.form.get("scheduled_for", "") - data = _check_messages(service_id, template_id, upload_id, row_index) + data = _check_messages(service_id, template_id, upload_id, row_index, force_hide_sender=True) return render_template( "views/check/preview.html", @@ -825,11 +817,11 @@ def send_one_off_to_myself(service_id, template_id): def check_notification(service_id, template_id): return render_template( "views/notifications/check.html", - **_check_notification(service_id, template_id), + **_check_notification(service_id, template_id, show_recipient=True), ) -def _check_notification(service_id, template_id, exception=None): +def _check_notification(service_id, template_id, exception=None, **kwargs): db_template = current_service.get_template_with_user_permission_or_403( template_id, current_user ) @@ -842,13 +834,9 @@ def _check_notification(service_id, template_id, exception=None): template = get_template( db_template, current_service, - show_recipient=True, email_reply_to=email_reply_to, sms_sender=sms_sender, - ) - simplifed_template = get_template( - db_template, - current_service, + **kwargs, ) placeholders = fields_to_fill_in(template) @@ -874,7 +862,6 @@ def _check_notification(service_id, template_id, exception=None): back_link_from_preview=back_link_from_preview, choose_time_form=choose_time_form, **(get_template_error_dict(exception) if exception else {}), - simplifed_template=simplifed_template, ) @@ -924,7 +911,7 @@ def preview_notification(service_id, template_id): return render_template( "views/notifications/preview.html", - **_check_notification(service_id, template_id), + **_check_notification(service_id, template_id, show_recipient=False, force_hide_sender=True), scheduled_for=session["scheduled_for"], recipient=recipient, ) diff --git a/app/main/views/sign_in.py b/app/main/views/sign_in.py index 5ca935e562..402e61a080 100644 --- a/app/main/views/sign_in.py +++ b/app/main/views/sign_in.py @@ -16,6 +16,7 @@ url_for, ) from flask_login import current_user +from notifications_utils.url_safe_token import generate_token from app import login_manager, user_api_client from app.main import main @@ -175,7 +176,16 @@ def sign_in(): other_device = current_user.logged_in_elsewhere() - initial_signin_url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL") + token = generate_token( + str(request.remote_addr), + current_app.config["SECRET_KEY"], + current_app.config["DANGEROUS_SALT"], + ) + url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL") + # handle unit tests + if url is not None: + url = url.replace("NONCE", token) + url = url.replace("STATE", token) return render_template( "views/signin.html", @@ -184,7 +194,7 @@ def sign_in(): other_device=other_device, login_gov_enabled=True, password_reset_url=password_reset_url, - initial_signin_url=initial_signin_url, + initial_signin_url=url, ) diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index cfa92a7e06..921efdc5e4 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -175,7 +175,7 @@ {% endblock %} {% block footer %} - + {% if current_service and current_service.research_mode %} {% set meta_suffix = 'Built by the Technology Transformation Servicesresearch mode' %} {% else %} @@ -251,7 +251,6 @@ "html": meta_suffix } }) }} - {% if current_user.is_authenticated %} {% block sessionUserWarning %} diff --git a/app/templates/components/components/footer/template.njk b/app/templates/components/components/footer/template.njk index f540b83374..07bcd4f3ef 100644 --- a/app/templates/components/components/footer/template.njk +++ b/app/templates/components/components/footer/template.njk @@ -4,38 +4,6 @@ #} diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 2f7306f095..4aac354d9f 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -14,7 +14,7 @@ Sent messages {% endif %} {% if current_user.has_permissions('manage_service', allow_org_user=True) %} - Usage + {# Usage #} {% endif %} {% block header %} {% if current_user.is_authenticated %} - {% if current_user.platform_admin %} - {% set navigation = [ - { - "href": url_for("main.show_accounts_or_dashboard"), - "text": "Current service", - "active": header_navigation.is_selected('accounts-or-dashboard') - }, - { - "href": url_for('main.get_started'), - "text": "Using Notify", - "active": header_navigation.is_selected('using_notify') - }, - { - "href": url_for('main.features'), - "text": "Features", - "active": header_navigation.is_selected('features') - }, - { - "href": url_for('main.platform_admin_splash_page'), - "text": "Platform admin", - "active": header_navigation.is_selected('platform-admin') - }, - { - "href": url_for('main.support'), - "text": "Contact us", - "active": header_navigation.is_selected('support') - } - ] %} - {% if current_service %} - {% set secondaryNavigation = [ - { - "href": url_for('main.service_settings', service_id=current_service.id), - "text": "Settings", - "active": secondary_navigation.is_selected('settings') - }, - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% else %} - {% set secondaryNavigation = [ - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% endif %} - {% else %} - {% set navigation = [ - { - "href": url_for("main.show_accounts_or_dashboard"), - "text": "Current service", - "active": header_navigation.is_selected('accounts-or-dashboard') - }, - { - "href": url_for('main.get_started'), - "text": "Using Notify", - "active": header_navigation.is_selected('using_notify') - }, - { - "href": url_for('main.features'), - "text": "Features", - "active": header_navigation.is_selected('features') - }, - { - "href": url_for('main.support'), - "text": "Contact us", - "active": header_navigation.is_selected('support') - }, - { - "href": url_for('main.user_profile'), - "text": "User profile", - "active": header_navigation.is_selected('user-profile') - } - ] %} - {% if current_service %} - {% set secondaryNavigation = [ - { - "href": url_for('main.service_settings', service_id=current_service.id), - "text": "Settings", - "active": secondary_navigation.is_selected('settings') - }, - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% else %} - {% set secondaryNavigation = [ - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% endif %} - {% endif %} - {% else %} - - {# {% set navigation = [ - { - "href": url_for('main.get_started'), - "text": "Using Notify", - "active": header_navigation.is_selected('using_notify') - }, - { - "href": url_for('main.features'), - "text": "Features", - "active": header_navigation.is_selected('features') - }, - { - "href": url_for('main.support'), - "text": "Contact us", - "active": header_navigation.is_selected('support') - }, - { - "href": url_for('main.sign_in'), - "text": "Sign in", - "active": header_navigation.is_selected('sign-in') - } - ] %} #} + {% include 'new/components/usa_banner.html' %} + {% include 'new/components/header.html' %} {% endif %} - - {{ usaHeader({ - "homepageUrl": url_for('main.show_accounts_or_dashboard'), - "productName": "Notify", - "navigation": navigation, - "navigationClasses": "govuk-header__navigation--end", - "secondaryNavigation": secondaryNavigation, - "assetsPath": asset_path + "images" - }) }} {% endblock %} - - {% block main %} {% block beforeContent %} @@ -197,88 +64,18 @@ {% endblock %} - - {% block footer %} {% if current_service and current_service.research_mode %} {% set meta_suffix = 'Built by the Technology Transformation Servicesresearch mode' %} {% else %} - {% set meta_suffix = 'Built by the Technology Transformation Services' %} + {% set commit_hash = ", Latest version: " + config['COMMIT_HASH'] %} + {% set long_link = 'Technology Transformation Services' %} + {% set meta_suffix = "Built by the " + long_link + commit_hash %} {% endif %} - {{ usaFooter({ - "classes": "js-footer", - "navigation": [ - { - "title": "About Notify", - "columns": 1, - "items": [ - { - "href": url_for("main.features"), - "text": "Features" - }, - { - "href": url_for("main.roadmap"), - "text": "Roadmap" - }, - { - "href": url_for("main.security"), - "text": "Security" - }, - { - "href": url_for("main.terms"), - "text": "Terms of use" - }, - ] - }, - { - "title": "Using Notify", - "columns": 1, - "items": [ - { - "href": url_for("main.get_started"), - "text": "Get started" - }, - { - "href": url_for("main.pricing"), - "text": "Pricing" - }, - { - "href": url_for("main.trial_mode_new"), - "text": "Trial mode" - }, - { - "href": url_for("main.message_status"), - "text": "Delivery status" - }, - { - "href": url_for("main.guidance_index"), - "text": "Guidance" - }, - { - "href": url_for("main.documentation"), - "text": "API documentation" - } - ] - }, - { - "title": "Support", - "columns": 1, - "items": [ - { - "href": url_for('main.support'), - "text": "Contact us" - }, - ] - }, - ], - "meta": { - "items": meta_items, - "html": meta_suffix - } - }) }} + {% include "new/components/footer.html" %} {% if current_user.is_authenticated %} {% block sessionUserWarning %} @@ -316,7 +113,6 @@ {% endif %} {% endblock %} - {% block bodyEnd %} {% block extra_javascripts %} diff --git a/app/templates/new/components/footer/footer.html b/app/templates/new/components/footer.html similarity index 58% rename from app/templates/new/components/footer/footer.html rename to app/templates/new/components/footer.html index fa22b6a882..45e6525a7b 100644 --- a/app/templates/new/components/footer/footer.html +++ b/app/templates/new/components/footer.html @@ -1,48 +1,14 @@