Four changes to the forms people write in. **The title is optional**, and says nothing about it: a field labelled «(opcional)» is a field asking to be filled in. An untitled post is «Sin Título» and the next is «Sin Título 2», so a list of them can still be told apart and linked to. apps/board/titles.py holds the rule. The numbering is done per place, against what is already there. The wall and the queue count every title in the table, deleted rows included — a number that comes back is a thread that looks like one somebody remembers reading. A public post counts the *filenames* in its folder instead, because that is what collides in a repository: two untitled posts on one day would both be `<fecha>-sin-titulo.es.md`, and the second would have failed as "somebody else saved this file while you were editing it", which is a message about a conflict that never happened. Clearing the title on an edit excludes the file being edited from its own check, so saving three times does not rename it three times. **The event box folds away.** Most posts are not events, and three date pickers between the title and the text are three fields most people scroll past. A <details>, like the account menu, so no script is involved; it opens by itself when the post already has a date. **The AI disclosure is a switch** rather than a checkbox — what it says is a statement about the text, not a detail of the form, and it should look like something that is on or off. Drawn entirely from the checkbox's own :checked state: under a policy with no 'unsafe-inline' a control that needs a script is a control that silently does nothing. The input stays in the tab order and keeps its label, so it works from a keyboard, and it is anchored inside its own label rather than left adrift over the page. **Cancelar is a button**, and Vista previa beside it is shaped the same: leaving is the other half of a decision and should be the same size as the half next to it. Quiet rather than filled, so the eye still knows which one publishes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
49 lines
1.8 KiB
HTML
49 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Recuperar contraseña{% endblock %}
|
|
|
|
{% block main %}
|
|
{% if unavailable %}
|
|
{# Refusing out loud rather than accepting the address and sending nothing.
|
|
Silence here would be indistinguishable from success — that is the point of
|
|
the identical answer below — so the one case where the server knows in
|
|
advance that it cannot help has to be said plainly. #}
|
|
<article class="card card--center">
|
|
<h1>Todavía no</h1>
|
|
<p class="muted">
|
|
Este servidor aún no puede cambiar contraseñas, así que un enlace de
|
|
recuperación no serviría de nada. Escribe a un administrador y te darán
|
|
acceso a mano.
|
|
</p>
|
|
<p><a class="linkish" href="{{ url_for('auth.login') }}">Volver a entrar</a></p>
|
|
</article>
|
|
{% elif sent %}
|
|
<article class="card card--center">
|
|
<h1>Revisa tu correo</h1>
|
|
{# Says the same thing whether or not that address belongs to a member.
|
|
Confirming it would turn this form into a way to find out who is one. #}
|
|
<p class="muted">
|
|
Si esa dirección pertenece a un miembro, le enviamos un enlace para elegir
|
|
una contraseña nueva. Caduca en una hora.
|
|
</p>
|
|
<p><a class="linkish" href="{{ url_for('auth.login') }}">Volver a entrar</a></p>
|
|
</article>
|
|
{% else %}
|
|
<form class="card" method="post" action="{{ url_for('auth.recover') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<h1>¿Olvidaste tu contraseña?</h1>
|
|
<p class="muted">
|
|
Escribe el correo con el que te dieron de alta y te enviamos un enlace para
|
|
elegir una nueva.
|
|
</p>
|
|
|
|
<label for="email">Correo</label>
|
|
<input id="email" name="email" type="email" required autocomplete="email">
|
|
|
|
<div class="actions">
|
|
<button class="btn" type="submit">Enviar enlace</button>
|
|
<a class="btn btn--quiet" href="{{ url_for('auth.login') }}">Cancelar</a>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
{% endblock %}
|