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>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "_macros.html" import crumbs, page_header, status_badge %}
|
||||
{% from "settings/_tabs.html" import settings_tabs %}
|
||||
{% from "account/_email_choices.html" import email_choices with context %}
|
||||
{% from "account/_email_choices.html" import email_section with context %}
|
||||
{% block title %}{{ user.username }} — Users — Steward{% endblock %}
|
||||
{% block section_tabs %}{{ settings_tabs("users") }}{% endblock %}
|
||||
{% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("Users", "/settings/users/"), (user.username, "")]) }}{% endblock %}
|
||||
@@ -38,12 +38,13 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if not local %}<p class="field-hint">{{ source }} finds this account by its own id, not by name, so renaming it here does not stop it signing in.</p>{% endif %}
|
||||
<button type="submit" class="btn">Save</button>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
{% if not reachable %}<p class="field-hint tone-warn">{{ user.email }} isn't an address mail can reach, so this account gets no email. Set a real one above.</p>{% endif %}
|
||||
{{ email_choices(user, defaults, "/settings/users/" ~ user.id ~ "/email", with_address=false) }}
|
||||
{% set zone = (user.time_zone or "UTC").split("/", 1)[-1]|replace("_", " ") %}
|
||||
{{ email_section(user, defaults, "this account's own zone (" ~ zone ~ ")", with_address=false, unreachable=not reachable) }}
|
||||
|
||||
<div class="form-actions"><button type="submit" class="btn">Save</button></div>
|
||||
</form>
|
||||
|
||||
<section class="card form-section" aria-labelledby="u-role">
|
||||
<h2 id="u-role" class="section-title">Role</h2>
|
||||
|
||||
Reference in New Issue
Block a user