webs unified

This commit is contained in:
Priec
2026-08-03 13:32:25 +02:00
parent 35d85de556
commit c8afe99d79
59 changed files with 1991 additions and 952 deletions

View File

@@ -0,0 +1,28 @@
{# GET /admin/validation/sets/new — crate::pages::add_validation::ui::ValidationSetPage #}
{% extends "ui/form_page.html" %}
{% import "ui/alert.html" as alert %}
{% block title %}Add validation set{% endblock %}
{% block eyebrow %}Global validation library{% endblock %}
{% block heading %}Add validation set{% endblock %}
{% block lead %}<p>Compose an ordered set from existing reusable rule names.</p>{% endblock %}
{% block form %}
<form hx-post="/admin/validation/sets" hx-target="#submission-status" hx-swap="innerHTML">
<div class="form-grid">
<label>Set name<input name="name" value="{{ form.name }}" required></label>
<label>Description<input name="description" value="{{ form.description }}"></label>
<label class="wide">Reusable rules
<input name="global_rules" value="{{ form.global_rules }}" required placeholder="required, invoice-number, max-length">
<small>Comma-separated and applied in this order.</small>
</label>
</div>
<div id="submission-status" aria-live="polite">
{%- if let Some(message) = error %}{% call alert::error("Could not save validation", message) %}{% endcall %}{% endif -%}
</div>
<div class="form-actions">
<a href="/admin">Cancel</a>
<button type="submit">Save set</button>
</div>
</form>
{% endblock %}