Files
FabledSteward/steward/templates/account/index.html
T
bvandeusenandClaude Opus 5.5 beae8a33f3
CI / lint (push) Successful in 2s
CI / integration (push) Failing after 1m8s
CI / unit (push) Successful in 1m36s
CI / publish (push) Skipped
fix(account): one form and one Save for your account; the same for an account's page in Users
Operator review of the Account page: two sections with two different
save buttons, one stuck to the next card and one beside a squeezed hint.
- Account: time zone and Email are one form; POST /account/ saves both,
  nothing unless all of it is valid. /account/email is gone.
- Users › account: Name and Email are one form; the rename route also
  saves the email switches. /settings/users/<id>/email is gone.
- The Email section is a plain section now (email_section); its hint sits
  under the switches, names the zone as the picker does, and links
  Notifications only for an admin.
- apply_email_form leaves a switch the form doesn't carry as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:05:41 -04:00

33 lines
1.4 KiB
HTML

{# account/index.html — the signed-in user's own account (milestone 490): who
they are, the time zone every page writes its times in, and their email
(milestone 495). One form, one Save. #}
{% extends "base.html" %}
{% from "_macros.html" import page_header, zone_select %}
{% from "account/_email_choices.html" import email_section with context %}
{% block title %}Your account — Steward{% endblock %}
{% block content %}
{{ page_header("Your account") }}
<p class="page-verdict">
Signed in as <strong>{{ user.username }}</strong> ({{ user.role.value }}) with {{ source }}
· times show in <strong>{{ zone_title }}</strong> ({{ zone_label }})
</p>
{% if error %}<div class="alert alert-error" role="alert">{{ error }}</div>{% endif %}
<form method="post" action="/account/" class="form-page">{{ csrf_field() }}
<section class="card form-section" aria-labelledby="acct-time">
<h2 id="acct-time" class="section-title">Time zone</h2>
<div class="field">
<label class="field-label" for="acct-tz">Show times in</label>
{{ zone_select("time_zone", "acct-tz", zone_name, zones) }}
<span class="field-hint">Every page writes its times in this zone, on a 24-hour clock.</span>
</div>
</section>
{{ email_section(user, defaults, "your time zone") }}
<div class="form-actions"><button type="submit" class="btn">Save</button></div>
</form>
{% endblock %}