7 lines
1.7 KiB
Go Template
7 lines
1.7 KiB
Go Template
{{define "content"}}<div class="form-layout policy-layout"><section class="panel"><div class="panel-head"><div><h2>Blocking policy</h2><p>Only allowlist and block action can be changed here.</p></div></div>
|
|
<form class="form-body" method="post" action="/policies"><input type="hidden" name="_csrf" value="{{.CSRF}}"><div class="field-row"><label for="blockAction" class="field-label">Block action <span class="required">*</span></label><select id="blockAction" name="block_action" class="field" required>{{range blockActions}}<option value="{{.}}" {{if eq . (selectval $.Data.Form "block_action")}}selected{{end}}>{{.}}</option>{{end}}</select><small>Configured action for matching block rules; NXDOMAIN/REFUSED/NULL/ADDRESS/NODATA.</small></div>
|
|
<div class="field-row"><label class="field-label" for="allowlist">Allowlist entries</label><textarea id="allowlist" name="allowlist" class="field mono" rows="10" placeholder="good.example.org">{{selectval .Data.Form "allowlist"}}</textarea><small>One entry per line. Empty list explicitly clears the allowlist.</small></div>
|
|
<div class="form-actions"><button type="reset" class="btn-ui">Discard local edits</button><button type="submit" class="btn-ui btn-primary-ui">Save supported settings</button></div></form></section>
|
|
<aside class="panel guide"><div class="panel-head"><h2>Other policy fields</h2></div><div class="panel-body"><p>All other fields are read-only in the REST API. View them here; edit the EasyDNS configuration file outside this panel.</p>
|
|
{{range $key,$v := .Data.Policies.Policy}}{{if and (ne $key "allowlist") (ne $key "block_action")}}<div class="data-row"><span>{{$key}}</span><strong class="break-any">{{string $v}}</strong></div>{{end}}{{end}}</div></aside></div>{{end}}
|