12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <!-- templates/add_account.html -->
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Add Account - KTVManager</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
- <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
- <style>
- /* Hide the spinner by default */
- #loadingSpinner {
- display: none;
- }
- </style>
- </head>
- <body>
- <!-- Navbar -->
- <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
- <a class="navbar-brand" href="/">KTVManager</a>
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarNav">
- <ul class="navbar-nav ml-auto">
- <li class="nav-item">
- <a class="nav-link" href="/">Home</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/accounts">Accounts</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/urls">URLs</a>
- </li>
- </ul>
- </div>
- </nav>
- <!-- Sub-navigation for Accounts -->
- <div class="bg-light py-2">
- <div class="container">
- <ul class="nav nav-pills">
- <li class="nav-item">
- <a class="nav-link" href="/accounts">List Accounts</a>
- </li>
- <li class="nav-item">
- <a class="nav-link active" href="/accounts/add">Add Account</a>
- </li>
- </ul>
- </div>
- </div>
- <!-- Main Content -->
- <main div class="container mt-5">
- <h1>Add Account</h1>
- <br>
-
- <form action="/accounts/add" method="POST" onsubmit="showLoading()">
- <div class="form-group">
- <label for="username">Username</label>
- <input type="text" class="form-control" id="username" name="username" required>
- </div>
- <div class="form-group">
- <label for="password">Password</label>
- <input type="text" class="form-control" id="password" name="password" required>
- </div>
- <div class="form-group">
- <label for="stream">Stream Name</label>
- <input type="text" class="form-control" id="stream" name="stream" required>
- </div>
- <button type="submit" class="btn btn-primary" id="submitButton">
- <span class="spinner-border spinner-border-sm" id="loadingSpinner" role="status" aria-hidden="true"></span>
- <span id="buttonText">Add Account</span>
- </button>
- </form>
- </div>
- </main>
-
- <footer class="bg-dark text-white text-center py-3 mt-5">
- <p></p>
- </footer>
- <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.0.7/dist/umd/popper.min.js"></script>
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
- <script>
- function showLoading() {
- // Disable the button to prevent multiple submissions
- document.getElementById("submitButton").disabled = true;
- // Show spinner and change button text
- document.getElementById("loadingSpinner").style.display = "inline-block";
- document.getElementById("buttonText").textContent = "Working...";
- }
- </script>
- </body>
- </html>
|