webs unified
This commit is contained in:
28
web/templates/pages/add_validation/set.html
Normal file
28
web/templates/pages/add_validation/set.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user