Projet

Général

Profil

0001-misc-prevent-double-click-in-displau_message_and_con.patch

Benjamin Dauvergne, 19 janvier 2022 13:14

Télécharger (1,21 ko)

Voir les différences:

Subject: [PATCH] misc: prevent double click in
 displau_message_and_continue.html (#60815)

 .../authentic2/display_message_and_continue.html       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
src/authentic2/templates/authentic2/display_message_and_continue.html
7 7
  </div>
8 8
  {% if only_info %}
9 9
    <script>
10
    window.setTimeout(function () {
11
      document.getElementById('a2-continue').click();
12
    }, 3000);
10
    $(function () {
11
      var $a2_continue = $('#a2-continue');
12
      # prevent double click
13
      var clicked = false;
14
      $a2_continue.on('click', function () { clicked = true; });
15
      window.setTimeout(function () { if (!clicked) { $a2_continue.click(); } }, 3000);
16
    });
13 17
    </script>
14 18
  {% endif %}
15 19
{% endblock %}
16
-