diff --git a/ccvpn/context_processors.py b/ccvpn/context_processors.py index 5d012be..27b4a9e 100644 --- a/ccvpn/context_processors.py +++ b/ccvpn/context_processors.py @@ -10,6 +10,6 @@ def some_settings(request): 'CLIENT_ON_VPN': is_vpn_gateway(client_ip), 'ROOT_URL': settings.ROOT_URL, 'ADDITIONAL_HTML': settings.ADDITIONAL_HTML, - 'SUPPORT_HTML': settings.SUPPORT_HTML, + 'SUPPORT_TEMPLATE': settings.SUPPORT_TEMPLATE, 'ADDITIONAL_HEADER_HTML': settings.ADDITIONAL_HEADER_HTML, } diff --git a/ccvpn/settings.py b/ccvpn/settings.py index 99bd92d..a45affb 100644 --- a/ccvpn/settings.py +++ b/ccvpn/settings.py @@ -175,8 +175,8 @@ ADDITIONAL_HEADER_HTML = '' # HTML added before ADDITIONAL_HTML = '' -# Will replace the default contact us thing when not empty -SUPPORT_HTML = '' +# Template to load for the live chat thing +SUPPORT_TEMPLATE = 'livechat_default.html' # Custom per cluster message displayed config page # 'cluster_name': "No P2P" diff --git a/templates/layout.html b/templates/layout.html index 5108a5b..7e0065c 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -98,15 +98,8 @@ {% block livechat_thing %} {% if not request.user.is_staff %} - {% if SUPPORT_HTML %} - {{SUPPORT_HTML | safe}} - {% else %} -
- - - {% blocktrans %}Any question? Chat with us{% endblocktrans %} - -
+ {% if SUPPORT_TEMPLATE %} + {% include SUPPORT_TEMPLATE %} {% endif %} {% endif %} {% endblock %}