This commit is contained in:
tamakyi
2026-09-08 10:10:44 +08:00
commit 2ed27dd55e
288 changed files with 67061 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<!--
全局屏蔽词表单部分模板:提问 / 私聊 / 投票 三个功能面板共用同一份词表设置。
渲染时「点」为 dict{ Root: 根数据, Action: 表单提交地址 }:
Root —— profile 页面根数据(LoggedUser / TagLimits / LangCode / CSRFTokenHTML …);
Action —— 表单 action,携带 ?tab= 来源面板参数,保存后回跳原面板。
三处展示同一份数据(users.block_words),任意一处修改保存后全部同步生效;
词表按 conf.Limits.MaxBlockWords / MaxBlockWordLen 上限校验(后端同一份配置)。
-->
{{ $root := .Root }}
<div class="uk-margin">
<form method="post" action="{{ .Action }}">
{{ $root.CSRFTokenHTML }}
<legend class="uk-legend">{{t $root.LangCode "admin.globalBlockWords"}}</legend>
<div class="uk-margin">
<p class="uk-text-meta uk-text-small">{{t $root.LangCode "admin.globalBlockWordsHint"}}</p>
<label class="uk-form-label">{{t $root.LangCode "admin.blockWords" | safe}}</label>
<input name="block_words" class="uk-input" type="text" value="{{$root.LoggedUser.BlockWords}}"
data-tb-tag-input
{{ with $root.TagLimits }}data-tb-max="{{ .MaxBlockWords }}" data-tb-max-len="{{ .MaxBlockWordLen }}"{{ end }}
data-tb-msg-too-many="{{t $root.LangCode "admin.flash.blockWordsTooMany"}}"
data-tb-msg-too-long="{{t $root.LangCode "admin.flash.blockWordTooLong"}}"
data-tb-msg-duplicate="{{t $root.LangCode "admin.tagInputDuplicate"}}"
data-tb-msg-hint="{{t $root.LangCode "admin.tagInputHint"}}">
</div>
<div class="tb-card-save">
<button type="submit" class="uk-button uk-button-primary">{{t $root.LangCode "admin.updateBlockWords"}}</button>
</div>
</form>
</div>