diff --git a/envergo/static/js/libs/shorten_url_for_copy.js b/envergo/static/js/libs/shorten_url_for_copy.js index 28729bc18d..181e9c4c78 100644 --- a/envergo/static/js/libs/shorten_url_for_copy.js +++ b/envergo/static/js/libs/shorten_url_for_copy.js @@ -4,7 +4,7 @@ e.stopImmediatePropagation(); e.preventDefault(); const button = e.currentTarget; - const currentUrl = window.location.href; + const currentUrl = button.getAttribute("data-clipboard-text") || window.location.href; const mapping = new UrlMapping(); mapping.create(currentUrl).then((json) => { button.setAttribute("data-clipboard-text", json.short_url); diff --git a/envergo/templates/haie/moulinette/result_plantation.html b/envergo/templates/haie/moulinette/result_plantation.html index b67a436add..d7d338107f 100644 --- a/envergo/templates/haie/moulinette/result_plantation.html +++ b/envergo/templates/haie/moulinette/result_plantation.html @@ -17,7 +17,7 @@

Simulation alternative pour ce dossier

@@ -29,7 +29,7 @@

Simulation alternative pour ce dossier

diff --git a/envergo/templates/haie/petitions/_alternatives_table.html b/envergo/templates/haie/petitions/_alternatives_table.html index a8860059f9..55d2d151a3 100644 --- a/envergo/templates/haie/petitions/_alternatives_table.html +++ b/envergo/templates/haie/petitions/_alternatives_table.html @@ -50,7 +50,7 @@ + class="action clipboard btn--copy-to-clipboard btn--shorten-url fr-icon-link"> + + {% endblock %}