Remove all inline JS from admin templates
script-src 'self' blocks inline onclick handlers and <script> blocks. Migrate all interactive behavior to data-* attributes wired by mcias.js: - data-toggle-form: accounts, policies, pgcreds create-form buttons - data-href: audit clickable table rows - data-tab: policy form tab switching (moved showTab from inline script) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{{define "audit_rows"}}
|
||||
{{range .Events}}
|
||||
<tr class="clickable-row" onclick="window.location='/audit/{{.ID}}'">
|
||||
<tr class="clickable-row" data-href="/audit/{{.ID}}">
|
||||
<td class="text-small text-muted"><a href="/audit/{{.ID}}">{{formatTime .EventTime}}</a></td>
|
||||
<td><code style="font-size:.8rem">{{.EventType}}</code></td>
|
||||
<td class="text-small text-muted">{{if .ActorUsername}}{{.ActorUsername}}{{else}}—{{end}}</td>
|
||||
|
||||
Reference in New Issue
Block a user