Skip to content

Commit

Permalink
Hide contact form on iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienheureux committed Jan 14, 2025
1 parent ecaaabb commit 1cd902b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def content(request):
def assistant(request) -> dict:
return {
"assistant": {
"is_iframe": "iframe" in request.GET,
"is_home": request.path == reverse("qfdmd:home"),
"POSTHOG_KEY": settings.ASSISTANT["POSTHOG_KEY"],
"MATOMO_ID": settings.ASSISTANT["MATOMO_ID"],
Expand Down
4 changes: 3 additions & 1 deletion templates/components/sidebar/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
>
{% include "./embed/action.html" %}
{% include "./share/action.html" %}
{% include "./email/action.html" %}
{% if not assistant.is_iframe %}
{% include "./email/action.html" %}
{% endif %}
</nav>
</aside>

0 comments on commit 1cd902b

Please sign in to comment.