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" }}
- {{ template "inc_alerts.html.tpl" .alerts }}

Authorized clients

diff --git a/auth/assets/templates/change-password.html.tpl b/auth/assets/templates/change-password.html.tpl index b49847756..5d59c460c 100644 --- a/auth/assets/templates/change-password.html.tpl +++ b/auth/assets/templates/change-password.html.tpl @@ -1,11 +1,9 @@ {{ template "inc_header.html.tpl" set . "activeNav" "security" }}
- {{ template "inc_alerts.html.tpl" .alerts }}

Change your password

{{ .csrfField }} diff --git a/auth/assets/templates/inc_alerts.html.tpl b/auth/assets/templates/inc_alerts.html.tpl deleted file mode 100644 index 5b6ea6d74..000000000 --- a/auth/assets/templates/inc_alerts.html.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{{ range . }} - -{{ end }} diff --git a/auth/assets/templates/inc_footer.html.tpl b/auth/assets/templates/inc_footer.html.tpl index e8113b80b..d4433a6c4 100644 --- a/auth/assets/templates/inc_footer.html.tpl +++ b/auth/assets/templates/inc_footer.html.tpl @@ -1,4 +1,5 @@ + {{ template "inc_toasts.html.tpl" .alerts }} {{ if .user }}
You're logged-in as @@ -15,5 +16,7 @@ version {{ version }} + + diff --git a/auth/assets/templates/inc_toasts.html.tpl b/auth/assets/templates/inc_toasts.html.tpl new file mode 100644 index 000000000..41ad1dfd2 --- /dev/null +++ b/auth/assets/templates/inc_toasts.html.tpl @@ -0,0 +1,16 @@ +
+{{ range . }} + +{{ end }} +
diff --git a/auth/assets/templates/login.html.tpl b/auth/assets/templates/login.html.tpl index 71ef824e1..77ddb8c56 100644 --- a/auth/assets/templates/login.html.tpl +++ b/auth/assets/templates/login.html.tpl @@ -1,11 +1,9 @@ {{ template "inc_header.html.tpl" . }}
- {{ template "inc_alerts.html.tpl" .alerts }}

Log in

{{ if .settings.LocalEnabled }} diff --git a/auth/assets/templates/oauth2-authorize-client.html.tpl b/auth/assets/templates/oauth2-authorize-client.html.tpl index e82f957a8..93b0375c4 100644 --- a/auth/assets/templates/oauth2-authorize-client.html.tpl +++ b/auth/assets/templates/oauth2-authorize-client.html.tpl @@ -1,8 +1,6 @@ {{/* setting hideNav=true to root scope and passign it to header template */}} {{ template "inc_header.html.tpl" set . "hideNav" true }}
- {{ template "inc_alerts.html.tpl" .alerts }} - {{ if .invalidUser }}