Build the core user-facing experience with admin login (bcrypt + signed session cookies), profile switcher, workout day viewer with warmups and exercise cards, and HTMX-powered exercise browser with search/filter. - AuthService with bcrypt password verification and itsdangerous session tokens - Auth dependency redirects to /login (303) for unauthenticated requests - NavContextMiddleware injects admin/profiles/active_profile into all templates - Profile management (list, switch, edit) with cookie-based active profile - Workout day viewer shows warmups + exercises + per-user programming targets - Exercise browser with HTMX filter dropdowns (no page reloads) - Flash message partial for success/error feedback - 12 new tests (66 total passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Edit Profile — {{ profile.display_name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<article>
|
|
<header>
|
|
<h2>Edit Profile: {{ profile.display_name }}</h2>
|
|
</header>
|
|
|
|
<form method="POST" action="/profiles/{{ profile.id }}/edit">
|
|
<label for="display_name">Display Name</label>
|
|
<input type="text" id="display_name" name="display_name"
|
|
value="{{ profile.display_name }}" required>
|
|
|
|
<label for="height">Height</label>
|
|
<input type="text" id="height" name="height"
|
|
value="{{ profile.height or '' }}" placeholder="e.g., 6'0"">
|
|
|
|
<label for="weight">Weight</label>
|
|
<input type="text" id="weight" name="weight"
|
|
value="{{ profile.weight or '' }}" placeholder="e.g., 260 lbs">
|
|
|
|
<label for="goals">Goals</label>
|
|
<textarea id="goals" name="goals"
|
|
placeholder="Training goals...">{{ profile.goals or '' }}</textarea>
|
|
|
|
<div class="grid">
|
|
<a href="/profiles" role="button" class="outline secondary">Cancel</a>
|
|
<button type="submit">Save Changes</button>
|
|
</div>
|
|
</form>
|
|
</article>
|
|
{% endblock %}
|