Menu form: AppearanceFormHTML for a consumer's hidden fields
A consumer whose middleware demands a CSRF token on every POST (yamase-web) had to exempt the menu's route; it can now put the hidden token field into the form instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
03a1ce56d8
commit
e4f88485f2
4 files changed
+34
-27
No files matched your search
@@ -12,7 +12,7 @@
|
||||
{{if .AppearancePath}}{{with .AppearanceMenu}}<details class="yw-appearance">
|
||||
<summary class="btn btn-outline-secondary btn-sm" title="{{.ThemeHeading}}: {{.Current.Label}}"><span aria-hidden="true">{{.Current.Symbol}}</span> {{.Current.Label}}</summary>
|
||||
<form method="post" action="{{$.BasePath}}{{$.AppearancePath}}" class="yw-appearance-menu m-0">
|
||||
<input type="hidden" name="back" value="{{$.AppearanceBack}}">
|
||||
<input type="hidden" name="back" value="{{$.AppearanceBack}}">{{$.AppearanceFormHTML}}
|
||||
<h6>{{.ThemeHeading}}</h6>
|
||||
{{range .Themes}}<button type="submit" name="theme" value="{{.ID}}" aria-pressed="{{.Current}}"><span aria-hidden="true">{{.Symbol}}</span> {{.Label}}</button>
|
||||
{{end}}<hr>
|
||||
|
||||
Reference in new issue
Block a user