user form, backup: two gaps the mockup comparison found
Owner, 2026-10-18: "Что ещё из макетов мы также прошляпили?" - every mockup held against the panel; two small gaps beyond the queues: - user.html: with All ticked, a list's single domains are disabled (mockup user.html:34-36). A panel.js show-when rule with disable: the boxes data-single-out / data-single-in follow data-all-out / data-all-in, at load and on change; a disabled box is not submitted, which the server ignores with All anyway. node test testdata/alldomains_test.js (fails on the previous panel.js). - backup.html: "domain's settings" is a link, to Outbound › Domains (mockup backup.html:35 links a domain's settings; a server page has no one domain). Tests: go test ./internal/web/... pass, TestPanelJS with node 24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<div class="column is-6">
|
||||
{{template "box_open" .Import}}
|
||||
{{template "body_open"}}
|
||||
<p class="mb-3">A domain export from another instance — plain <code>.json</code> or encrypted <code>.spde</code>. Its DKIM key and application passwords come across, so the published DNS needs no change. The export itself is made on the domain's settings page.</p>
|
||||
<p class="mb-3">A domain export from another instance — plain <code>.json</code> or encrypted <code>.spde</code>. Its DKIM key and application passwords come across, so the published DNS needs no change. The export itself is made on the <a href="/outbound/domains">domain's settings</a>.</p>
|
||||
<form class="sp-form" method="post" action="{{.ImportAction}}" enctype="multipart/form-data">
|
||||
<div class="field"><label class="label" for="importfile">Domain export file</label>
|
||||
<div class="file has-name is-fullwidth"><label class="file-label"><input class="file-input" id="importfile" name="file" type="file" accept=".json,.spde,application/json" required data-import-file><span class="file-cta"><i class="ti ti-upload"></i><span class="file-label ml-2">Choose a file…</span></span><span class="file-name">No file chosen</span></label></div></div>
|
||||
|
||||
@@ -34,16 +34,16 @@
|
||||
<div class="column is-6">
|
||||
{{template "box_open" .Outbound}}
|
||||
{{template "body_open"}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="all_domains" value="1"{{if .AllOut}} checked{{end}}> <strong>All outbound domains</strong>, including ones added later</label></div>{{range .OutDomains}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="domain_ids" value="{{.ID}}"{{if .Checked}} checked{{end}}> {{.Name}}</label></div>{{end}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="all_domains" value="1" data-all-out{{if .AllOut}} checked{{end}}> <strong>All outbound domains</strong>, including ones added later</label></div>{{range .OutDomains}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="domain_ids" value="{{.ID}}" data-single-out{{if .Checked}} checked{{end}}> {{.Name}}</label></div>{{end}}
|
||||
<p class="help">With <em>All</em> ticked the single domains are ignored.</p>
|
||||
{{template "body_close"}}
|
||||
{{template "box_close"}}
|
||||
{{if .ShowInbound}}
|
||||
{{template "box_open" .Inbound}}
|
||||
{{template "body_open"}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="all_inbound_domains" value="1"{{if .AllIn}} checked{{end}}> <strong>All inbound domains</strong>, including ones added later</label></div>{{range .InDomains}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="inbound_domain_ids" value="{{.ID}}"{{if .Checked}} checked{{end}}> {{.Name}}</label></div>{{end}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="all_inbound_domains" value="1" data-all-in{{if .AllIn}} checked{{end}}> <strong>All inbound domains</strong>, including ones added later</label></div>{{range .InDomains}}
|
||||
<div class="field"><label class="checkbox"><input type="checkbox" name="inbound_domain_ids" value="{{.ID}}" data-single-in{{if .Checked}} checked{{end}}> {{.Name}}</label></div>{{end}}
|
||||
<p class="help">Granted separately from outbound: the same name on both lists is two assignments. The <em>domain</em> role needs at least one domain, or <em>All</em>, on either list.</p>
|
||||
{{template "body_close"}}
|
||||
{{template "box_close"}}
|
||||
|
||||
Reference in New Issue
Block a user