diff --git a/bookwyrm/static/js/shared.js b/bookwyrm/static/js/shared.js index 60e78052..55d0d64d 100644 --- a/bookwyrm/static/js/shared.js +++ b/bookwyrm/static/js/shared.js @@ -1,9 +1,12 @@ +// set up javascript listeners window.onload = function() { - var toggles = document.getElementsByClassName('toggle-control'); - // .forEach(t => t.onclick = toggle_action); - for (var i=0; i t.onclick = toggle_action); + + // javascript interactions + Array.from(document.getElementsByClassName('interaction')) + .forEach(t => t.onsubmit = interact); }; function toggle_action(e) { diff --git a/bookwyrm/templates/snippets/boost_button.html b/bookwyrm/templates/snippets/boost_button.html index e6688124..08daae64 100644 --- a/bookwyrm/templates/snippets/boost_button.html +++ b/bookwyrm/templates/snippets/boost_button.html @@ -1,7 +1,7 @@ {% load bookwyrm_tags %} {% with status.id|uuid as uuid %} -
+ {% csrf_token %}
-
+ {% csrf_token %}
-
+ {% csrf_token %} {% endif %}
-
+ {% csrf_token %}