restrict v7

This commit is contained in:
tamakyi
2026-10-18 23:04:50 +08:00
parent bd81398a06
commit 317c96ca17
15 changed files with 128 additions and 13 deletions
+13 -1
View File
@@ -99,7 +99,19 @@
<option value="divisive">{{t .LangCode "report.reason.divisive"}}</option>
<option value="other">{{t .LangCode "report.reason.other"}}</option>
</select>
<button type="submit" class="uk-button uk-button-default uk-button-small">{{t .LangCode "report.submit"}}</button>
{{ if eq .CaptchaType "math" }}
<!-- 算数验证码:点击后由 header 的全局弹窗接管,答案回填到本表单的隐藏域 -->
<input type="hidden" name="g-recaptcha-response" value="">
<button type="button" class="uk-button uk-button-default uk-button-small math-captcha-trigger">{{t .LangCode "report.submit"}}</button>
{{ else }}
<button type="submit" class="uk-button uk-button-default uk-button-small g-recaptcha" data-sitekey="{{.RecaptchaSiteKey}}" data-callback="tbReportCaptchaOk">{{t .LangCode "report.submit"}}</button>
<script>
function tbReportCaptchaOk() {
var f = document.querySelector('form[action$="/report"]');
if (f) { f.submit(); }
}
</script>
{{ end }}
</form>
</details>
</div>
+7
View File
@@ -227,6 +227,13 @@
<option value="private_question" {{if eq .SelectedType "private_question"}}selected{{end}}>{{t .LangCode "qlist.privateQuestion"}}</option>
</select>
</div>
<div class="uk-margin-small-right" style="width: 120px;">
<label class="uk-form-label uk-text-small">{{t .LangCode "qlist.reportFilter"}}</label>
<select name="reported" class="uk-select uk-form-small" onchange="this.form.submit()" style="width: 100%;">
<option value="all" {{if eq .SelectedReported "all"}}selected{{end}}>{{t .LangCode "qlist.all"}}</option>
<option value="reported" {{if eq .SelectedReported "reported"}}selected{{end}}>{{t .LangCode "qlist.reportedOnly"}}</option>
</select>
</div>
<div style="width: 120px;">
<label class="uk-form-label uk-text-small">{{t .LangCode "qlist.readStatus"}}</label>
<select name="read" class="uk-select uk-form-small" onchange="this.form.submit()" style="width: 100%;">