## Problem Fixed: The admin setup page (admin_setup.html) had incomplete form styling that could appear "corrupted" or broken, especially when form validation errors occurred. ## Root Cause: The admin_setup.html template was missing explicit form group styles and relying only on base.html auth-form styles, which weren't sufficient for all form states and could lead to layout issues. ## Solution Implemented: ### Enhanced Admin Setup Form Styling - **Added explicit form-group styles** - Ensures proper spacing and layout - **Complete auth-form style definitions** - All form elements now have consistent styling - **Proper focus states** - Form inputs have correct focus indicators - **Box-sizing fix** - Prevents layout overflow issues - **Enhanced button styling** - Consistent with other admin pages - **Form validation support** - Proper styling for error states ### Style Additions: - Form group margin and spacing - Input field padding, borders, and backgrounds - Focus states with proper color transitions - Button hover effects and animations - Auth footer styling for better layout The admin setup page now has robust, consistent styling that matches the rest of the admin interface and won't appear corrupted under various states. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
137 lines
4.2 KiB
HTML
137 lines
4.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Create Admin Account - {{ APP_NAME }}{% endblock %}
|
|
|
|
{% block content %}
|
|
{% include '_nav.html' %}
|
|
<div class="auth-container">
|
|
<div class="auth-card">
|
|
<div class="auth-logo">
|
|
<a href="{{ url_for('index') }}">
|
|
<img src="{{ url_for('serve_logo') }}" alt="{{ APP_NAME }} Logo" style="max-width: 80px; border-radius: 50%;">
|
|
</a>
|
|
<h1><span class="balance">balance</span><span class="board">Board</span></h1>
|
|
<p style="color: var(--text-secondary); margin-top: 8px;">Create Administrator Account</p>
|
|
</div>
|
|
|
|
<div class="flash-messages">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="flash-message {{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
</div>
|
|
|
|
<form method="POST" class="auth-form">
|
|
<div class="form-group">
|
|
<label for="username">Username</label>
|
|
<input type="text" id="username" name="username" required
|
|
placeholder="Choose admin username" autocomplete="username">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="email">Email Address</label>
|
|
<input type="email" id="email" name="email" required
|
|
placeholder="admin@example.com" autocomplete="email">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password" required
|
|
placeholder="Create strong password" autocomplete="new-password">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password_confirm">Confirm Password</label>
|
|
<input type="password" id="password_confirm" name="password_confirm" required
|
|
placeholder="Confirm your password" autocomplete="new-password">
|
|
</div>
|
|
|
|
<button type="submit">Create Admin Account</button>
|
|
</form>
|
|
|
|
<div class="auth-footer">
|
|
<p style="color: var(--text-secondary); font-size: 0.9rem; text-align: center;">
|
|
This will create the first administrator account for BalanceBoard.
|
|
<br>This user will have full system access.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.auth-container {
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
|
|
}
|
|
|
|
.auth-card {
|
|
border-top: 4px solid var(--primary-color);
|
|
}
|
|
|
|
.balance {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.board {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Ensure form styles are properly applied */
|
|
.auth-form .form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.auth-form label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.auth-form input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 2px solid var(--border-color);
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
background: var(--background-color);
|
|
color: var(--text-primary);
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.auth-form input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.1);
|
|
}
|
|
|
|
.auth-form button {
|
|
width: 100%;
|
|
padding: 14px;
|
|
background: var(--primary-color);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.auth-form button:hover {
|
|
background: var(--primary-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(77, 182, 172, 0.3);
|
|
}
|
|
|
|
.auth-footer {
|
|
margin-top: 24px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
{% endblock %}
|