Files
2026-09-13 19:59:54 +01:00

49 lines
2.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}{{ 'Edit' if alert else 'New' }} alert{% endblock %}
{% block content %}
<div class="section-head">
<div>
<span class="section-tag">// section 02 {{ 'edit' if alert else 'new' }}</span>
<h1>{{ 'Edit alert' if alert else 'New alert' }}</h1>
{% if alert %}<p class="lead">Last updated <span class="mono">{{ alert.updated_at.strftime('%Y-%m-%d %H:%M:%S') }}</span> UTC.</p>{% endif %}
</div>
<a href="{{ url_for('main.alerts_list') }}" class="btn btn-ghost">← Back</a>
</div>
<div class="panel" style="max-width: 720px;">
<div class="panel-body">
<form method="post" class="form" novalidate>
{{ form.csrf_token }}
<div>
{{ form.title.label }}{{ form.title(placeholder="e.g. Microsoft 365 Renewal") }}
{% for err in form.title.errors %}<div class="error">{{ err }}</div>{% endfor %}
</div>
<div class="form-grid-2">
<div>
{{ form.category.label }}{{ form.category(placeholder="License, SSL, Domain, Contract …") }}
{% for err in form.category.errors %}<div class="error">{{ err }}</div>{% endfor %}
</div>
<div>
{{ form.expiration_date.label }}{{ form.expiration_date() }}
{% for err in form.expiration_date.errors %}<div class="error">{{ err }}</div>{% endfor %}
</div>
</div>
<div>
{{ form.description.label }}{{ form.description(rows=4, placeholder="Optional detail shown on the alert card.") }}
{% for err in form.description.errors %}<div class="error">{{ err }}</div>{% endfor %}
</div>
<div>
{{ form.reminder_days.label }}{{ form.reminder_days() }}
<div class="help">Comma-separated days BEFORE expiration when an email reminder fires. Example: <span class="mono">30,14,7,1</span></div>
{% for err in form.reminder_days.errors %}<div class="error">{{ err }}</div>{% endfor %}
</div>
<div class="check-row">{{ form.is_active() }} {{ form.is_active.label }}</div>
<div class="btn-row">
{{ form.submit(class_="btn btn-primary") }}
<a href="{{ url_for('main.alerts_list') }}" class="btn btn-ghost">Cancel</a>
</div>
</form>
</div>
</div>
{% endblock %}