From d39bd2e47363030ed4365469d07009f0825796b0 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Thu, 14 Jul 2022 15:42:02 +0200 Subject: [PATCH] Conditionaly include notification js. --- .../src/sass/apply/components/_activity-notifications.scss | 6 ++++-- hypha/templates/base-apply.html | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hypha/static_src/src/sass/apply/components/_activity-notifications.scss b/hypha/static_src/src/sass/apply/components/_activity-notifications.scss index 74cb4494b..ba63b70b7 100644 --- a/hypha/static_src/src/sass/apply/components/_activity-notifications.scss +++ b/hypha/static_src/src/sass/apply/components/_activity-notifications.scss @@ -44,8 +44,10 @@ padding-right: 1em; } - .form__select { - margin-right: 1em; + .form { + &__select { + margin-right: 1em; + } } } } diff --git a/hypha/templates/base-apply.html b/hypha/templates/base-apply.html index 27017d54b..ce30affbf 100644 --- a/hypha/templates/base-apply.html +++ b/hypha/templates/base-apply.html @@ -30,7 +30,9 @@ <script src="{% static 'js/jquery.min.js' %}"></script> <script src="{% static 'js/js.cookie.min.js' %}"></script> <script src="{% static 'js/main-top.js' %}"></script> + {% if latest_notifications %} <script defer src="{% static 'js/apply/notifications.js' %}"></script> + {% endif %} {% if COOKIES_ACCEPTED and MATOMO_URL and MATOMO_SITEID %} {# we are only expecting strings, so make sure we escape the values #} <script> -- GitLab