Skip to content

Commit

Permalink
dashboard: add Tally popup for prescribers and employers
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-naeka committed Jan 24, 2025
1 parent 932b815 commit 3952e7d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions itou/templates/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,24 @@ <h2>Événements à venir</h2>
{% block script %}
{{ block.super }}
<script src="{% static 'js/sliding_tabs.js'%}"></script>

{% if user.is_employer or user.is_prescriber_with_authorized_org %}
<script async src="https://tally.so/widgets/embed.js"></script>
<script nonce="{{ CSP_NONCE }}">
window.TallyConfig = {
"formId": "{{ user.is_employer|yesno:'mKvOeK,mZvQpy' }}",
"popup": {
"emoji": {
"text": "👋",
"animation": "wave"
},
"autoClose": 0,
"showOnce": true,
"hiddenFields": {
"user_id": "{{ user.pk }}",
},
}
};
</script>
{% endif %}
{% endblock %}

0 comments on commit 3952e7d

Please sign in to comment.