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

Ajout d'une popup Tally sur la dashboard prescripteurs habilités et employeurs [GEN-2351] #5456

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
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
dashboard: add Tally popup for prescribers and employers
leo-naeka committed Jan 24, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 79af6f144c5d15b41de2d9ceea25173afc169250
20 changes: 20 additions & 0 deletions itou/templates/dashboard/dashboard.html
Original file line number Diff line number Diff line change
@@ -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 %}