Skip to content

Commit

Permalink
move condition
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Mar 8, 2024
1 parent 67a2402 commit fbe6b6a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
44 changes: 23 additions & 21 deletions lemarche/templates/tenders/_detail_nps_tally_form.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<script async type="text/javascript" src="https://tally.so/widgets/embed.js"></script>
<script type="text/javascript">
window.TallyConfig = {
"formId": "{{ nps_form_id }}",
"popup": {
"width": 400,
"emoji": {
"text": "👋",
"animation": "wave"
{% if nps_form_id %}
<script async type="text/javascript" src="https://tally.so/widgets/embed.js"></script>
<script type="text/javascript">
window.TallyConfig = {
"formId": "{{ nps_form_id }}",
"popup": {
"width": 400,
"emoji": {
"text": "👋",
"animation": "wave"
},
"open": {
"trigger": "time",
"ms": 2000
},
// "showOnce": true, // show the popup only once to the same visitor (even if he didn't submit)
"doNotShowAfterSubmit": true, // after the visitor submits the form, don't show the popup again
"autoClose": 0, // automatically hide the popup after the form is submitted. optionally set a delay in seconds.
"hideTitle": true,
"layout": "modal" // display in the center instead of bottom right corner
},
"open": {
"trigger": "time",
"ms": 2000
},
// "showOnce": true, // show the popup only once to the same visitor (even if he didn't submit)
"doNotShowAfterSubmit": true, // after the visitor submits the form, don't show the popup again
"autoClose": 0, // automatically hide the popup after the form is submitted. optionally set a delay in seconds.
"hideTitle": true,
"layout": "modal" // display in the center instead of bottom right corner
},
};
</script>
};
</script>
{% endif %}
4 changes: 1 addition & 3 deletions lemarche/templates/tenders/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,5 @@
}
</script>
{% endif %}
{% if nps_form_id %}
{% include "tenders/_detail_nps_tally_form.html" %}
{% endif %}
{% include "tenders/_detail_nps_tally_form.html" %}
{% endblock %}
2 changes: 0 additions & 2 deletions lemarche/templates/tenders/survey_transactioned_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,5 @@ <h1 class="h1 mb-3 mb-lg-5">
{% endblock %}

{% block extra_js %}
{% if nps_form_id %}
{% include "tenders/_detail_nps_tally_form.html" %}
{% endif %}
{% endblock %}

0 comments on commit fbe6b6a

Please sign in to comment.