refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (#37567)

Sub-templates have direct access to `ctx.RootData` (the root data map),
so there is no need for callers to explicitly pass it as `ctxData` via `dict`.

Also fix #37569 by the way

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Copilot
2026-05-06 18:21:48 +00:00
committed by GitHub
parent ebc058f682
commit b093c2c43c
95 changed files with 140 additions and 140 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}}
{{template "admin/layout_head" (dict "pageClass" "admin settings new webhook")}}
<div class="admin-setting-content">
{{$CustomHeaderTitle := ctx.Locale.Tr "admin.defaulthooks.update_webhook"}}
{{if .PageIsAdminDefaultHooksNew}}
@@ -8,6 +8,6 @@
{{else if .Webhook.IsSystemWebhook}}
{{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.update_webhook"}}
{{end}}
{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
{{template "webhook/new" (dict "CustomHeaderTitle" $CustomHeaderTitle)}}
</div>
{{template "admin/layout_footer" .}}