2026-02-12 16:19:20 +00:00

71 lines
3.0 KiB
HTML

{% extends 'base.html' %}
{% load static i18n %}
{% block title %}{% trans "Login" %} - {{ site_settings.business_name }}{% endblock %}
{% block content %}
<div class="login-wrapper">
<div class="card glass-card border-0 shadow-lg p-4 login-card">
<div class="text-center mb-4">
<h2 class="fw-bold text-primary">{% trans "Welcome Back" %}</h2>
<p class="text-muted small">{% trans "Please login to access your dashboard" %}</p>
</div>
{% if form.errors %}
<div class="alert alert-danger alert-dismissible fade show" role="alert">
{% trans "Your username and password didn't match. Please try again." %}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endif %}
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<div class="mb-3">
<label for="id_username" class="form-label small fw-bold">{% trans "Username" %}</label>
<div class="input-group">
<span class="input-group-text bg-light border-0"><i class="bi bi-person text-muted"></i></span>
<input type="text" name="username" autofocus maxlength="150" required id="id_username" class="form-control bg-light border-0" placeholder="{% trans 'Enter username' %}">
</div>
</div>
<div class="mb-4">
<label for="id_password" class="form-label small fw-bold">{% trans "Password" %}</label>
<div class="input-group">
<span class="input-group-text bg-light border-0"><i class="bi bi-lock text-muted"></i></span>
<input type="password" name="password" required id="id_password" class="form-control bg-light border-0" placeholder="{% trans 'Enter password' %}">
</div>
</div>
<button type="submit" class="btn btn-primary w-100 py-2 fw-bold shadow-sm">
{% trans "Sign In" %}
</button>
<input type="hidden" name="next" value="{{ next }}">
</form>
<div class="mt-4 text-center">
<p class="small text-muted mb-0">{% trans "Need help? Contact your administrator." %}</p>
</div>
</div>
</div>
<style>
/* Reset and centering for login page */
#sidebar, .top-navbar { display: none !important; }
#content { margin-left: 0 !important; width: 100%; min-height: 100vh; background-color: #f0f2f5; }
main { padding: 0 !important; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrapper {
width: 100%;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.login-card {
max-width: 400px;
width: 100%;
background-color: white !important;
border-radius: 20px;
}
</style>
{% endblock %}