Skip to content

Commit

Permalink
Show not interested modal if not_interested=True in the url
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Mar 6, 2024
1 parent 1632cce commit f8a78fc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lemarche/templates/tenders/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@
{% endblock %}

{% block extra_js %}
{% if not siae_has_detail_not_interested_click_date %}
<script type="text/javascript">
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('not_interested') && urlParams.get('not_interested') === 'True') {
// why click() instead of OpenBootstrapModal('#detail_not_interested_click_confirm_modal') ?
// why setTimeout ?
// --> to have the siae_id set in the modal
setTimeout(function() {
document.querySelector('#show-tender-not-interested-modal-btn').click();
}, 100);
}
</script>
{% endif %}
{% if TALLY_NPS_FORM_ID and show_nps %}
<script async type="text/javascript" src="https://tally.so/widgets/embed.js"></script>
<script type="text/javascript">
Expand Down

0 comments on commit f8a78fc

Please sign in to comment.