96 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			96 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								<!-- 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">
							 | 
						||
| 
								 | 
							
								    <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 -->
							 | 
						||
| 
								 | 
							
								    <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>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <footer class="bg-dark text-white text-center py-3 mt-5">
							 | 
						||
| 
								 | 
							
								        <p>© 2024 KTV Manager | All rights reserved</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>
							 |