diff --git a/static/buckler.js b/static/buckler.js index 5d7462a..fa085a4 100644 --- a/static/buckler.js +++ b/static/buckler.js @@ -37,3 +37,22 @@ function perm_change(row) { } console.log("perms_changed = " + perms_changed); } + +function submit_user_perms(row) { + let row_perms = {}; + for (let child of row.children) { + if (child.firstChild.type == "checkbox") { + if (child.firstChild.checked) { + row_perms[child.firstChild.dataset.appName] = true; + } else { + row_perms[child.firstChild.dataset.appName] = false; + } + } + } + console.log(row_perms); + fetch(window.location.pathname, { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: row_perms + }); +} diff --git a/templates/index.html b/templates/index.html index 614948d..b70e18e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -32,6 +32,7 @@

Admin Panel

+

User Permissions

@@ -53,13 +54,14 @@ {% for name, value in values.items() %} {% endfor %} - + {% endfor %}
+

Invite New User