webs unified
This commit is contained in:
25
web/templates/pages/add_validation/rule.html
Normal file
25
web/templates/pages/add_validation/rule.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{# GET /admin/validation/rules/new — crate::pages::add_validation::ui::ValidationRulePage #}
|
||||
{% extends "ui/form_page.html" %}
|
||||
{% import "ui/alert.html" as alert %}
|
||||
|
||||
{% block title %}Add reusable validation rule{% endblock %}
|
||||
{% block eyebrow %}Global validation library{% endblock %}
|
||||
{% block heading %}Add reusable validation rule{% endblock %}
|
||||
{% block lead %}<p>A named rule that validation sets can compose, independent of any table.</p>{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<form hx-post="/admin/validation/rules" hx-target="#submission-status" hx-swap="innerHTML">
|
||||
<div class="form-grid">
|
||||
<label>Rule name<input name="rule_name" value="{{ page.form.rule_name }}" required></label>
|
||||
<label>Description<input name="description" value="{{ page.form.description }}"></label>
|
||||
{% include "pages/add_validation/shared_fields.html" %}
|
||||
</div>
|
||||
<div id="submission-status" aria-live="polite">
|
||||
{%- if let Some(message) = page.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 rule</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user