diff --git a/auth/assets/public/script.js b/auth/assets/public/script.js index 2b5c5950e..0dbee26be 100644 --- a/auth/assets/public/script.js +++ b/auth/assets/public/script.js @@ -1,10 +1,12 @@ -// placeholder +$(function () { + $('.toast').toast('show'); -function buttonDisabler() { - setTimeout(function() { - let bb = document.getElementsByTagName('button') - for (let i = 0; i < bb.length; i++) { - bb[i].disabled = true - } - }, 100) -} + $('form').not('do-not-disable-buttons-on-submit').on('submit', function() { + let form = this + setTimeout(function() { + $('button, input[type=submit]', form) + .not('do-not-disable-on-submit') + .attr('disabled', true) + }, 50) + }) +}) diff --git a/auth/assets/templates/authorized-clients.html.tpl b/auth/assets/templates/authorized-clients.html.tpl index 0ae4c7989..deeed68e3 100644 --- a/auth/assets/templates/authorized-clients.html.tpl +++ b/auth/assets/templates/authorized-clients.html.tpl @@ -1,12 +1,10 @@ {{ template "inc_header.html.tpl" set . "activeNav" "clients" }}