Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: cmd-79 rename tacc cms settings #792

Merged
merged 51 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a36f951
refactor: cmd-79 `PORTAL_` not `TACC_` ⚠️ UNTESTED
wesleyboar Jan 31, 2024
89137cc
chore: remove duplicate property (and value)
wesleyboar Jan 31, 2024
8b37872
docs: tv3-181, logo property mapping
wesleyboar Jan 31, 2024
128ef34
docs(upgrade-project): cmd-79/tv3-181
wesleyboar Jan 31, 2024
06b85b1
docs(upgrade-project): append "+" to 4.7 and 3.12
wesleyboar Jan 31, 2024
bb1c0c5
docs: abandon "Rename Certain Other Settings"
wesleyboar Jan 31, 2024
5ef9ad0
refactor: cmd-79 `INCLUDES_` `SEARCH_` ⚠️ UNTESTED
wesleyboar Jan 31, 2024
f750299
docs(upgrade-project): add "update custom favicon setting"
wesleyboar Jan 31, 2024
a54b3ab
docs(upgrade-project): use diff for logo/favicon
wesleyboar Jan 31, 2024
c7c7b52
style: cmd-79 move `is_remote` property
wesleyboar Jan 31, 2024
aaeef24
docs(upgrade-project): fix bad target / h3 link
wesleyboar Jan 31, 2024
586a566
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Feb 8, 2024
a056d0d
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Feb 8, 2024
dcce7bc
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Feb 12, 2024
2422213
fix(taccsite_custom): bad submodule merge resolve
wesleyboar Feb 12, 2024
11f6e45
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Mar 6, 2024
f67c12f
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Mar 7, 2024
e6931ba
Merge branch 'feat/cmd-79-support-new-core-cms-settings-prefix' of gi…
wesleyboar Mar 7, 2024
05aac5b
docs: cmd-79 upgrade use of favicon in templates
wesleyboar Mar 7, 2024
5baa128
docs: cmd-79 settings rename to be in v4.9 not 4.8
wesleyboar Mar 7, 2024
fe773e6
fix: cmd-79 favicon missing but in settings export
wesleyboar Mar 7, 2024
1f2e9f8
fix: cmd-79 logo missing from settings export
wesleyboar Mar 7, 2024
eeee7eb
fix: cmd-79 backwards-compatibility must read imports (UNTESTED)
wesleyboar Mar 7, 2024
648c4d7
fix: cmd-79 simpler backwards-compatibility (UNTESTED)
wesleyboar Mar 7, 2024
9e110ed
fix: cmd-79 backwards-compatibility loop bug (UNTESTED)
wesleyboar Mar 8, 2024
c4f0cff
fix: cmd-79 backwards-compatibility typo (UNTESTED)
wesleyboar Mar 8, 2024
2749fd1
fix: cmd-79 backwards-compatibility if missing settings
wesleyboar Mar 8, 2024
5d459d1
feat: CMD-79 custom nav width via PORTAL_NAV_WIDTH
wesleyboar Mar 8, 2024
92f57a3
fix: CMD-79 core-styles bug appears with custom nav width
wesleyboar Mar 8, 2024
617219f
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Mar 25, 2024
a0a9d1e
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar May 9, 2024
6a92257
Revert "feat: CMD-79 custom nav width via PORTAL_NAV_WIDTH"
wesleyboar Jun 28, 2024
6f66098
fix: backwards compatibility code typos
wesleyboar Jun 28, 2024
a020673
feat: CMD-79 custom nav width via PORTAL_NAV_WIDTH (#837)
wesleyboar Jun 28, 2024
2d7d864
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Jun 28, 2024
2b41cb1
refactor: PORTAL_IS_CORE → PORTAL_MANAGES_AUTH
wesleyboar Jun 28, 2024
cccba01
style: rename SHOW_ vars in header.html
wesleyboar Jun 28, 2024
71bdb45
refactor: …_MANAGES_AUTH → …_IS_TACC_CORE_PORTAL
wesleyboar Jun 28, 2024
51f856b
docs: 4.12 (not 4.9) will rename settings
wesleyboar Jun 28, 2024
ab7041d
fix: only swap TACC_ with PORTAL_ if necessary
wesleyboar Jun 28, 2024
4d067f2
feat: backwards-compatible INCLUDES_ and SEARCH_
wesleyboar Jun 28, 2024
da38030
style: move settings (so PORTAL_'s are together)
wesleyboar Jun 28, 2024
3afa0ab
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Jun 28, 2024
1c523fe
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Jun 28, 2024
f7ee3e6
fix: server crash / missing LOGO setting key
wesleyboar Jun 28, 2024
9d8b6bd
chore: remove cruft comment
wesleyboar Jun 28, 2024
9fa4c04
style: no new line in deprecated settings code
wesleyboar Jun 28, 2024
6192416
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Jul 3, 2024
fe9438b
fix: example settings rename
wesleyboar Jul 3, 2024
36f083b
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
wesleyboar Jul 3, 2024
6fc79bc
test: package.json version v4.12.0-beta.5
wesleyboar Jul 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion docs/upgrade-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,40 @@

## Table of Contents

- [from v4.N to v4.12](#from-v4n-to-v412)
- [from v4.N to v4.7](#from-v4n-to-v47)
- [from v3 to v4](#from-v3-to-v4)
- [from v3.N to v3.12](#from-v3n-to-v312)
- [from v2 to v3](#from-v2-to-v3)

## from v4.N to v4.12

- [Rename Certain Settings](#rename-certain-settings)

### Rename Certain Settings

| from | to |
| - | - |
| `INCLUDES_CORE_PORTAL` | `PORTAL_IS_TACC_CORE_PORTAL` |
| `INCLUDES_PORTAL_NAV` | `PORTAL_HAS_LOGIN` |
| `INCLUDES_SEARCH_BAR` | `PORTAL_HAS_SEARCH` |
| `TACC_BLOG_SHOW_CATEGORIES` | `PORTAL_BLOG_SHOW_CATEGORIES` |
| `TACC_BLOG_SHOW_TAGS` | `PORTAL_BLOG_SHOW_TAGS` |
| `TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY` | `PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY` |
| `TACC_BLOG_SHOW_ABSTRACT_TAG` | `PORTAL_BLOG_SHOW_ABSTRACT_TAG` |
| `TACC_BLOG_CATEGORY_ORDER` | `PORTAL_BLOG_CATEGORY_ORDER` |
| `TACC_SOCIAL_SHARE_PLATFORMS` | `PORTAL_SOCIAL_SHARE_PLATFORMS` |
| `SEARCH_PATH` | `PORTAL_SEARCH_PATH` |
| `SEARCH_QUERY_PARAM_NAME` | `PORTAL_SEARCH_QUERY_PARAM_NAME` |

## from v4.N to v4.7

- [Update Custom Favicon Setting](#update-custom-favicon-setting)
- [Upgrade Custom Logo Setting](#upgrade-custom-logo-setting)

### Update Custom Favicon Setting

1. Rename the `FAVICON` dict to `PORTAL_FAVICON`.
1. Refactor `FAVICON` setting as `PORTAL_FAVICON`.
2. Add a key/value pair to the `PORTAL_FAVICON`.

```diff
Expand All @@ -26,6 +47,8 @@
}
```

3. Update use of `FAVICON` to use `PORTAL_FAVICON` ([example](https://github.com/TACC/tup-ui/pull/436/files#diff-7fe664832c1616b48f1b567baa26f1641a1de7e681f93546da5224dbd755eed2L13-R14)).

### Upgrade Custom Logo Setting

Refactor the `LOGO` array to a `PORTAL_LOGO` dict:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tacc/core-cms",
"version": "4.11.1",
"version": "4.12.0-beta.5",
"license": "MIT",
"author": "TACC ACI WMA <[email protected]>",
"description": "The TACC ACI-WMA Core CMS codebase used by TACC Portals.",
Expand Down
4 changes: 2 additions & 2 deletions taccsite_cms/_settings/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
# 1. Set 'LDAP_ENABLED = False'.
# 2. Duplicate the 'AUTHENTICATION_BACKENDS' setting.
# 3. Remove its '...LDAPBackend' entry.
# 4. If 'INCLUDES_CORE_PORTAL = False', remove '...CorePortalAuthBackend' entry.
# 4. If 'PORTAL_IS_TACC_CORE_PORTAL = False', remove '...CorePortalAuthBackend' entry.
#
# RFE: Use INCLUDES_CORE_PORTAL to toggle '...CorePortalAuthBackend'.
# RFE: Use PORTAL_IS_TACC_CORE_PORTAL to toggle '...CorePortalAuthBackend'.

# Requires django-auth-ldap ≥ 2.0.0
# TODO: Determine whether this is safe to delete.
Expand Down
6 changes: 3 additions & 3 deletions taccsite_cms/_settings/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

PORTAL_ES_ENABLED = True

SEARCH_PATH = '/search'
PORTAL_SEARCH_PATH = '/search'

if PORTAL_ES_ENABLED:
# Elasticsearch
SEARCH_QUERY_PARAM_NAME = 'query_string'
PORTAL_SEARCH_QUERY_PARAM_NAME = 'query_string'
else:
# Google
SEARCH_QUERY_PARAM_NAME = 'q'
PORTAL_SEARCH_QUERY_PARAM_NAME = 'q'

########################
# ELASTICSEARCH
Expand Down
108 changes: 76 additions & 32 deletions taccsite_cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,14 @@ def gettext(s): return s
# TACC: PORTAL
########################

INCLUDES_CORE_PORTAL = True
INCLUDES_PORTAL_NAV = True
INCLUDES_SEARCH_BAR = True
PORTAL_IS_TACC_CORE_PORTAL = True
PORTAL_HAS_LOGIN = True
PORTAL_HAS_SEARCH = True

# Only use one of these values: 'sm', 'md', 'lg', 'xl'
# SEE: https://getbootstrap.com/docs/4.0/components/navbar/#responsive-behaviors
# FAQ: A falsy value will trigger default logic for nav width
PORTAL_NAV_WIDTH = False

LOGOUT_REDIRECT_URL = '/'

Expand All @@ -277,8 +282,7 @@ def gettext(s): return s
# TACC: SOCIAL MEDIA
########################

# TODO: Enable ONLY after TUP-590
TACC_SOCIAL_SHARE_PLATFORMS = []
PORTAL_SOCIAL_SHARE_PLATFORMS = []
# TACC_SOCIAL_SHARE_PLATFORMS = ['linkedin', 'instagram', 'facebook', 'bluesky', 'email']

########################
Expand All @@ -296,14 +300,14 @@ def gettext(s): return s
# Only effective with a DJANGOCMS_BLOG
# SEE: https://github.com/TACC/Core-CMS/blob/ff6c727/taccsite_cms/settings_custom.example.py#L139-L185

TACC_BLOG_SHOW_CATEGORIES = True
TACC_BLOG_SHOW_TAGS = True
PORTAL_BLOG_SHOW_CATEGORIES = True
PORTAL_BLOG_SHOW_TAGS = True
# To flag posts of certain category or tag, so template can take special action
TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'sample_value_e_g__mutlimedia__'
TACC_BLOG_SHOW_ABSTRACT_TAG = 'sample_value_e_g__redirect__'
PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'sample_value_e_g__mutlimedia__'
PORTAL_BLOG_SHOW_ABSTRACT_TAG = 'sample_value_e_g__redirect__'

TACC_BLOG_CATEGORY_ORDER = []
# TACC_BLOG_CATEGORY_ORDER = ['press-release', 'feature-story', 'multimedia', 'podcast']
PORTAL_BLOG_CATEGORY_ORDER = []
# PORTAL_BLOG_CATEGORY_ORDER = ['press-release', 'feature-story', 'multimedia', 'podcast']

########################
# DJANGO & DJANGO_CMS & TACC
Expand Down Expand Up @@ -667,13 +671,14 @@ def get_subdirs_as_module_names(path):
]

########################
# IMPORT & EXPORT
# SETTINGS IMPORT
########################

try:
from taccsite_cms.settings_custom import *
import taccsite_cms.settings_custom as settings_custom
except ModuleNotFoundError:
pass
settings_custom = []

try:
from taccsite_cms.secrets import *
Expand All @@ -682,8 +687,9 @@ def get_subdirs_as_module_names(path):

try:
from taccsite_cms.settings_local import *
import taccsite_cms.settings_local as settings_local
except ModuleNotFoundError:
pass
settings_local = []

try:
from taccsite_cms import custom_app_settings
Expand All @@ -693,34 +699,72 @@ def get_subdirs_as_module_names(path):
except ImportError:
pass

# Support deprecated settings
########################
# SETTINGS DEPRECATED
########################
# TODO: Make clients not use nor set these

# Some clients still use deprecated settings in templates
# E.g. TACC/Core-CMS-Custom, TACC/tup-ui (before TACC/tup-ui#436/)
deprecated_SETTINGS_EXPORT = ['LOGO']
if 'LOGO' not in locals():
LOGO = False
if 'FAVICON' not in locals():
FAVICON = False
else:
PORTAL_FAVICON = FAVICON

# Export expected settings
SETTINGS_EXPORT = [
'DEBUG',
'BRANDING',
'LOGO', # deprecated
'FAVICON', # deprecated
'PORTAL_LOGO',
'PORTAL_FAVICON',
LOGO = False # header_logo.html reads this setting

# Some clients still support these settings
old_setting_names = [
'FAVICON'
'INCLUDES_CORE_PORTAL',
'INCLUDES_PORTAL_NAV',
'INCLUDES_SEARCH_BAR',
'GOOGLE_ANALYTICS_PROPERTY_ID',
'GOOGLE_ANALYTICS_PRELOAD',
'TACC_BLOG_SHOW_CATEGORIES',
'TACC_BLOG_SHOW_TAGS',
'TACC_CORE_STYLES_VERSION',
'TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY',
'TACC_BLOG_SHOW_ABSTRACT_TAG',
'TACC_BLOG_CATEGORY_ORDER',
'TACC_SOCIAL_SHARE_PLATFORMS',
'SEARCH_PATH',
'SEARCH_QUERY_PARAM_NAME',
]
for old_setting_name in old_setting_names:
if old_setting_name in locals() or \
hasattr(settings_custom, old_setting_name) or \
hasattr(settings_local, old_setting_name):
if old_setting_name.startswith('TACC_'):
stripped_setting_name = old_setting_name.replace('TACC_', '')
locals()['PORTAL_' + stripped_setting_name] = locals()[old_setting_name]
if old_setting_name.startswith('SEARCH_'):
locals()['PORTAL_' + old_setting_name] = locals()[old_setting_name]
if 'FAVICON' == old_setting_name:
deprecated_SETTINGS_EXPORT += ['FAVICON']
if 'INCLUDES_CORE_PORTAL' == old_setting_name:
PORTAL_IS_TACC_CORE_PORTAL = INCLUDES_CORE_PORTAL
if 'INCLUDES_PORTAL_NAV' == old_setting_name:
PORTAL_HAS_LOGIN = INCLUDES_PORTAL_NAV
if 'INCLUDES_SEARCH_BAR' == old_setting_name:
PORTAL_HAS_SEARCH = INCLUDES_SEARCH_BAR

########################
# SETTINGS EXPORT
########################

SETTINGS_EXPORT = deprecated_SETTINGS_EXPORT + [
'DEBUG',
'BRANDING',
'TACC_CORE_STYLES_VERSION',
'GOOGLE_ANALYTICS_PROPERTY_ID',
'GOOGLE_ANALYTICS_PRELOAD',
'PORTAL_LOGO',
'PORTAL_FAVICON',
'PORTAL_IS_TACC_CORE_PORTAL',
'PORTAL_HAS_LOGIN',
'PORTAL_HAS_SEARCH',
'PORTAL_NAV_WIDTH',
'PORTAL_BLOG_SHOW_CATEGORIES',
'PORTAL_BLOG_SHOW_TAGS',
'PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY',
'PORTAL_BLOG_SHOW_ABSTRACT_TAG',
'PORTAL_BLOG_CATEGORY_ORDER',
'PORTAL_SOCIAL_SHARE_PLATFORMS',
'PORTAL_SEARCH_PATH',
'PORTAL_SEARCH_QUERY_PARAM_NAME',
]
5 changes: 2 additions & 3 deletions taccsite_cms/settings_custom.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"is_remote": True,
"img_file_src": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@813aa7c/ptdatax_assets/logo.png",
"img_class": "", # additional class names
"is_remote": True,
"link_href": "/",
"link_target": "_self",
"img_alt_text": "Custom CMS", # E.g. PT DataX, Frontera
Expand Down Expand Up @@ -188,8 +187,8 @@
# DJANGOCMS_BLOG: TACC
########################

TACC_BLOG_SHOW_CATEGORIES = True
TACC_BLOG_SHOW_TAGS = True
PORTAL_BLOG_SHOW_CATEGORIES = True
PORTAL_BLOG_SHOW_TAGS = True

########################
# DJANGOCMS_BLOG: DJANGO
Expand Down
6 changes: 3 additions & 3 deletions taccsite_cms/settings_local.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
# Hide error about using Google Recaptcha test keys
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

# Disable the Core-Portal integration.
INCLUDES_CORE_PORTAL = False
INCLUDES_PORTAL_NAV = False
# Disable the Core-Portal integration
PORTAL_IS_TACC_CORE_PORTAL = False
PORTAL_HAS_LOGIN = False
4 changes: 2 additions & 2 deletions taccsite_cms/templates/djangocms_blog/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
{% endif %}

<div class="app app-blog
{% if not settings.TACC_BLOG_SHOW_CATEGORIES %}no-categories{% endif %}
{% if not settings.TACC_BLOG_SHOW_TAGS %}no-tags{% endif %}
{% if not settings.PORTAL_BLOG_SHOW_CATEGORIES %}no-categories{% endif %}
{% if not settings.PORTAL_BLOG_SHOW_TAGS %}no-tags{% endif %}
{% if post %} {% include './includes/blog_cats.html' with prefix='has-' %} {% include './includes/blog_tags.html' with prefix='has-' %}
{% endif %}
">
Expand Down
4 changes: 2 additions & 2 deletions taccsite_cms/templates/djangocms_blog/post_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

{# /TACC #}
{# TACC (define whether this is a special post): #}
{% blog_post_use_custom_media post settings.TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY as use_custom_media %}
{% blog_post_is_show_abstract post settings.TACC_BLOG_SHOW_ABSTRACT_TAG as is_show_abstract_post %}
{% blog_post_use_custom_media post settings.PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY as use_custom_media %}
{% blog_post_is_show_abstract post settings.PORTAL_BLOG_SHOW_ABSTRACT_TAG as is_show_abstract_post %}
{# /TACC #}
<article id="post-{{ post.slug }}" class="post-item post-detail">
<header>
Expand Down
25 changes: 20 additions & 5 deletions taccsite_cms/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@
<!-- Sponsor Logos -->
{% include "header_branding.html" %}

{% with settings.PORTAL_HAS_LOGIN as SHOW_LOGIN_NAV %}
{% with settings.PORTAL_HAS_SEARCH as SHOW_SEARCH_BAR %}
{% with settings.PORTAL_NAV_WIDTH as NAV_WIDTH %}

<!-- Navigation Bar -->
<nav id="s-header" class="s-header navbar {% if settings.INCLUDES_CORE_PORTAL %}navbar-expand-xl{% else %}navbar-expand-lg{% endif %} navbar-dark">
<nav id="s-header" class="s-header navbar navbar-dark
{% if NAV_WIDTH %}
navbar-expand-{{NAV_WIDTH}}
{% elif SHOW_LOGIN_NAV or SHOW_SEARCH_BAR %}
navbar-expand-xl
{% else %}
navbar-expand-lg
{% endif %}
">
<!-- Portal Logo -->
{% include "header_logo.html" %}

Expand All @@ -20,16 +32,19 @@
<!-- Navbar Links -->
<div class="collapse navbar-collapse" id="navbarsExpandTarget">
{# GL-6: Remove need for different `className` values #}
{% if settings.INCLUDES_PORTAL_NAV or settings.INCLUDES_SEARCH_BAR %}
{% if SHOW_LOGIN_NAV or SHOW_SEARCH_BAR %}
{# FAQ: If template were included with `only`, then it would NOT render `show_menu` #}
{% include "nav_cms.html" with className="navbar-nav mr-auto" %}

{# NOTE: As of 2022-10, search is only available with a Portal #}
{% if settings.INCLUDES_SEARCH_BAR %}{% include "nav_search.html" with className="form-inline" settings=settings only %}{% endif %}
{% if settings.INCLUDES_PORTAL_NAV %}{% include "nav_portal.html" with className="navbar-nav" settings=settings only %}{% endif %}
{% if SHOW_SEARCH_BAR %}{% include "nav_search.html" with className="form-inline" settings=settings only %}{% endif %}
{% if SHOW_LOGIN_NAV %}{% include "nav_portal.html" with className="navbar-nav" settings=settings only %}{% endif %}
{% else %}
{# FAQ: If template were included with `only`, then it would NOT render `show_menu` #}
{% include "nav_cms.html" with className="navbar-nav ml-auto" %}
{% endif %}
</div>
</nav>

{% endwith %}
{% endwith %}
{% endwith %}
2 changes: 1 addition & 1 deletion taccsite_cms/templates/nav_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
import * as inputFieldValue from '/static/site_cms/js/modules/inputFieldValue.js';

const shadowRoot = document.getElementById('s-search-bar').shadowRoot;
inputFieldValue.update(shadowRoot, '{{ settings.SEARCH_QUERY_PARAM_NAME }}');
inputFieldValue.update(shadowRoot, '{{ settings.PORTAL_SEARCH_QUERY_PARAM_NAME }}');
</script>
4 changes: 2 additions & 2 deletions taccsite_cms/templates/nav_search.raw.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<link rel="stylesheet" href="{% static 'site_cms/css/build/element.tacc-search-bar.css' %}">
{% endif %}

<form part="form" method="get" action="{{ settings.SEARCH_PATH }}">
<form part="form" method="get" action="{{ settings.PORTAL_SEARCH_PATH }}">
<label for="header-search" class="u-hide--visually" part="label">
Search
</label>

<input part="input"
id="header-search"
type="search"
name="{{ settings.SEARCH_QUERY_PARAM_NAME }}"
name="{{ settings.PORTAL_SEARCH_QUERY_PARAM_NAME }}"
placeholder="Search"
data-testid="input"
autocomplete="off" minlength="3" required
Expand Down
4 changes: 2 additions & 2 deletions taccsite_cms/templates/share_on_social.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{# @var className #}

{% with request.scheme|add:"://"|add:request.get_host|add:request.path as url %}
{% with settings.TACC_SOCIAL_SHARE_PLATFORMS as platforms %}
{% with settings.PORTAL_SOCIAL_SHARE_PLATFORMS as platforms %}
<nav class="logos--social {{className}}">
{% if platforms|length == 0 %}
<!-- No entries found in settings.TACC_SOCIAL_SHARE_PLATFORMS -->
<!-- No entries found in settings.PORTAL_SOCIAL_SHARE_PLATFORMS -->
{% else %}
{% block text_before %}
<span class="logos__text-before">share this:</span>
Expand Down
Loading