Files
bryanpedini 440f78ce9e
Test / test (push) Successful in 26m44s
Build and publish image / image (push) Successful in 27m27s
feat(ui): improve the records table, view state and record dialog
Sortable record columns, filters and sort kept in the URL on the zones,
zone and audit pages, a Show action that filters the records table to a
problem's owner, Save and add another, a highlight of the saved row, an
Audit history link on the zone page, and dialogs that keep typed input
on a backdrop click.
2026-11-22 17:36:46 +01:00

39 lines
1.6 KiB
HTML

{{- /* SPDX-License-Identifier: GPL-2.0-or-later */ -}}
{{- /* Copyright (C) 2026 Bryan Joshua Pedini */ -}}
{{define "record_dialog"}}<dialog id="record-dialog" class="dialog" aria-labelledby="record-dialog-title">
<form id="record-form" class="form" novalidate>
<div class="dialog-head">
<h2 id="record-dialog-title">Add record</h2>
<button type="button" class="btn btn-icon" data-close aria-label="Close">&times;</button>
</div>
<div class="dialog-body">
<div class="alert alert-warn" id="record-broken" hidden>
<p>The stored row cannot be served correctly. Saving replaces it with the values below.</p>
<p>Stored content: <code class="mono" id="record-raw"></code></p>
</div>
<div class="field">
<label for="rec-name">Name</label>
<input id="rec-name" name="name" type="text" autocomplete="off" autocapitalize="none" spellcheck="false" placeholder="@" aria-describedby="rec-fqdn">
<p class="hint" id="rec-fqdn" aria-live="polite"></p>
</div>
<div class="field">
<label for="rec-type">Type</label>
<select id="rec-type" name="type"></select>
</div>
<div class="field">
<label for="rec-ttl">TTL (seconds)</label>
<input id="rec-ttl" name="ttl" type="text" inputmode="numeric" value="3600">
<p class="hint">0 means default (360 s).</p>
</div>
<div id="rec-fields"></div>
</div>
<div class="dialog-actions">
<p class="hint dialog-status" id="rec-status" role="status"></p>
<button type="button" class="btn" data-close>Cancel</button>
<button type="button" class="btn" id="rec-submit-another" hidden>Save and add another</button>
<button type="submit" class="btn btn-primary" id="rec-submit">Save record</button>
</div>
</form>
</dialog>{{end}}