fix
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ASF SSO - Admin Portal</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Login Page -->
|
||||
<div id="login-page" class="flex items-center justify-center" style="height: 100vh;">
|
||||
@@ -42,7 +44,7 @@
|
||||
<section id="users-section">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h2 class="text-2xl">Users</h2>
|
||||
<button class="btn btn-primary" onclick="openModal('user-modal')">Add User</button>
|
||||
<button class="btn btn-primary" onclick="addUser()">Add User</button>
|
||||
</div>
|
||||
<div class="card">
|
||||
<table id="users-table">
|
||||
@@ -67,7 +69,7 @@
|
||||
<section id="apps-section" class="hidden">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h2 class="text-2xl">Applications</h2>
|
||||
<button class="btn btn-primary" onclick="openModal('app-modal')">Add Application</button>
|
||||
<button class="btn btn-primary" onclick="addApp()">Add Application</button>
|
||||
</div>
|
||||
<div class="card">
|
||||
<table id="apps-table">
|
||||
@@ -147,4 +149,5 @@
|
||||
|
||||
<script src="/static/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -183,6 +183,22 @@ userForm.addEventListener("submit", async (e) => {
|
||||
}
|
||||
});
|
||||
|
||||
window.addUser = () => {
|
||||
document.getElementById("user-id").value = "";
|
||||
document.getElementById("user-username").value = "";
|
||||
document.getElementById("user-email").value = "";
|
||||
document.getElementById("user-password").value = "";
|
||||
document.getElementById("user-is-admin").checked = false;
|
||||
document.getElementById("user-is-active").checked = true;
|
||||
openModal("user-modal");
|
||||
};
|
||||
|
||||
window.addApp = () => {
|
||||
document.getElementById("app-name").value = "";
|
||||
document.getElementById("app-url").value = "";
|
||||
openModal("app-modal");
|
||||
};
|
||||
|
||||
window.editUser = (user) => {
|
||||
document.getElementById("user-id").value = user.id;
|
||||
document.getElementById("user-username").value = user.username;
|
||||
|
||||
Reference in New Issue
Block a user