A member signing in has no idea what Gitea is, and for anyone this platform is ever sold to it is a competitor's name on their login page. Fourteen strings named it — a button, a logout page, an account-creation notice and eleven error messages — plus Gitea's own sign-in and authorize screens, which every member passes through. Ours are reworded: "el servidor de cuentas" where the thing has to be referred to at all, and nothing where it did not. Gitea's own screens take APP_NAME plus the two footer switches, which are supported settings rather than a patched template. APP_NAME goes in app.ini's unnamed root section, spelled DEFAULT in the environment mapping, so the docs carry a command to confirm it landed — a key written to a section that does not exist is accepted in silence. Comments, docstrings, column names and env vars keep the real name. The code has to stay honest about what it talks to, none of it reaches a browser, and renaming gitea_login would mean a migration for nothing. Two guards added, since this is the kind of thing that creeps back one error message at a time: no template renders the word outside a Jinja comment, and no string literal outside a docstring contains it. Checked against the previous commit, where they catch the one message that had already been missed by hand. Licence: MIT, no attribution-in-UI clause, and we redistribute nothing — the official image runs unmodified with its own LICENSE intact. Gitea ships the "powered by" switch itself. Reasoning recorded in §12. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
67 lines
2.4 KiB
HTML
67 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Dar de alta{% endblock %}
|
|
|
|
{% block main %}
|
|
<form class="card" method="post" action="{{ url_for('members.new') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<h1>Dar de alta a alguien</h1>
|
|
|
|
<label for="login">Usuario</label>
|
|
<input id="login" name="login" required pattern="[A-Za-z0-9][A-Za-z0-9._\-]*"
|
|
placeholder="maria.lopez">
|
|
<p class="muted small">Letras, números, punto, guion y guion bajo.</p>
|
|
|
|
<label for="display_name">Nombre</label>
|
|
<input id="display_name" name="display_name" placeholder="María López">
|
|
|
|
<label for="email">Correo</label>
|
|
<input id="email" name="email" type="email" placeholder="maria@ejemplo.com">
|
|
|
|
{% if can_create_accounts %}
|
|
<label class="check">
|
|
<input type="checkbox" name="create_account" checked>
|
|
Crear también su cuenta (desmarca si ya tiene una)
|
|
</label>
|
|
{% else %}
|
|
{# Disabled rather than hidden: "you cannot do this here" is more use than
|
|
an option that quietly is not there. The handler refuses it either way. #}
|
|
<label class="check">
|
|
<input type="checkbox" name="create_account" disabled>
|
|
Crear también su cuenta
|
|
</label>
|
|
<p class="muted small">
|
|
Este servidor no puede crear cuentas (le falta el token de administración).
|
|
Créala primero en el
|
|
<a href="{{ gitea_url }}/admin/users/new">servidor de cuentas</a> y luego
|
|
da de alta aquí ese mismo usuario.
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if can_create_accounts and not can_send_mail %}
|
|
{# Not an error: the account is still created and the invitation still
|
|
issued. But it leaves by hand, and finding that out after filling the
|
|
form is how an invitation ends up believed sent and never delivered. #}
|
|
<p class="muted small">
|
|
Este servidor todavía no envía correo, así que la invitación no se
|
|
enviará sola: al terminar te mostraremos el enlace para que se lo pases.
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if can_make_admin %}
|
|
<label for="role">Rol</label>
|
|
<select id="role" name="role">
|
|
<option value="user">Usuario</option>
|
|
<option value="admin">Administrador</option>
|
|
</select>
|
|
{% else %}
|
|
<input type="hidden" name="role" value="user">
|
|
<p class="muted small">Los administradores sólo pueden dar de alta usuarios.</p>
|
|
{% endif %}
|
|
|
|
<div class="actions">
|
|
<button class="btn" type="submit">Dar de alta</button>
|
|
<a class="linkish" href="{{ url_for('members.index') }}">Cancelar</a>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|