From 738028b1982c4f60378d5c3fdc5f0ec84f89fe6c Mon Sep 17 00:00:00 2001 From: Lou Knauer Date: Mon, 2 May 2022 12:00:44 +0200 Subject: [PATCH] Fix #11 and introduce presentation mode --- frontend | 2 +- templates/config.tmpl | 128 +++++++++++++++++++++++++----------------- 2 files changed, 77 insertions(+), 53 deletions(-) diff --git a/frontend b/frontend index e8d82a0..348b138 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit e8d82a00a4215457a57735c7d7db7076daca5643 +Subproject commit 348b138be943de337cfb1592f0b8fd3a2ce5a5d7 diff --git a/templates/config.tmpl b/templates/config.tmpl index adc027c..2ef9258 100644 --- a/templates/config.tmpl +++ b/templates/config.tmpl @@ -49,60 +49,68 @@
Special Users

Not created by an LDAP sync and/or having a role other than user

- - - - - - - - - - - - - -
UsernameNameEmailRolesJWTDelete
Loading...
+ listElement.querySelectorAll('button.del-user').forEach(e => e.addEventListener('click', event => { + let row = event.target.parentElement.parentElement + let username = row.children[0].innerText + if (confirm('Are you sure?')) { + let formData = new FormData() + formData.append('username', username) + fetch('/api/users/', { method: 'DELETE', body: formData }).then(res => { + if (res.status == 200) { + row.remove() + } else { + event.target.innerText = res.statusText + } + }) + } + })) + }) +
@@ -136,6 +144,22 @@ +
+
+
Scramble Names / Presentation Mode
+ + +
+
{{end}}