You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
5.4 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skyonn Admin Portal</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>
body {
font-family: Arial;
}
.container {
width: 20rem;
margin: auto;
border: 1px solid black;
padding: 20px;
border-radius: 10px;
margin-top: 50px;
position: relative;
}
.input-group {
margin-bottom: 10px;
}
.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="email"],
.input-group select {
width: calc(100% - 22px);
border-radius: 5px;
padding: 10px;
box-sizing: border-box;
display: block;
margin-bottom: 5px;
font-weight: bold;
}
button {
background-color: white;
color: black;
padding: 5px;
border-radius: 5px;
margin: 3px 0;
width: 100%;
font-size: 15px;
background-color:#66D3FA;
}
h2 {
color: black;
text-align: center;
margin-top: -5px;
margin-bottom: 20px;
}
.toggle-form {
text-align: center;
margin-top: 20px;
}
.toggle-form a {
color: #3C99DC;
text-decoration: none;
}
.footer-text {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
color: #3C99DC;
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>Skyonn Admin Portal</h2>
<div id="login-form">
<form id="login-form" action="{% url 'admin-login' %}" method="post">
{% csrf_token %}
<div class="input-group">
<input type="text" placeholder="Phone" name="phone" required>
</div>
<div class="input-group">
<input type="password" placeholder="Password" name="password" required>
</div>
<button type="submit" name="login-form">Login</button>
</form>
<div class="toggle-form">
<p>New user? <a href="#" onclick="toggleForms('signup-form')">Sign Up</a></p>
</div>
</div>
<div id="signup-form" style="display: none;">
<form method="post" action="{% url 'create_admin' %}" enctype="multipart/form-data">
{% csrf_token %}
<div class="input-group">
<label for="first_name">First Name*:</label>
<input type="text" id="first_name" name="first_name" required>
</div>
<div class="input-group">
<label for="last_name">Last Name*:</label>
<input type="text" id="last_name" name="last_name" required>
</div>
<div class="input-group">
<label for="phone">Phone no.*:</label>
<input type="text" id="phone" name="phone" required>
</div>
<div class="input-group">
<label for="phone_2">Phone no. 2:</label>
<input type="text" id="phone_2" name="phone_2">
</div>
<div class="input-group">
<label for="company_email">Company Email*:</label>
<input type="email" id="company_email" name="company_email" required>
</div>
<div class="input-group">
<label for="personal_email">Personal Email*:</label>
<input type="email" id="personal_email" name="personal_email" required>
</div>
<div class="input-group">
<label for="address">Address*:</label>
<input type="text" id="address" name="address" required>
</div>
<div class="input-group">
<label for="work_location">Work Location*:</label>
<input type="text" id="work_location" name="work_location" required>
</div>
<div class="input-group">
<label for="password">Password*:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="input-group">
<label for="picture">Upload Picture *</label>
<input type="file" id="picture" name="picture">
</div>
<input type="submit" value="Create Account" name="signup-form">
</form>
<div class="toggle-form">
<p>Already have an account? <a href="#" onclick="toggleForms('login-form')">Login</a></p>
</div>
</div>
</div>
<script>
function toggleForms(formId) {
var signupForm = document.getElementById('signup-form');
var loginForm = document.getElementById('login-form');
if (formId === 'signup-form') {
signupForm.style.display = 'block';
loginForm.style.display = 'none';
} else {
signupForm.style.display = 'none';
loginForm.style.display = 'block';
}
}
</script>
</body>
</html>