1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-09 11:08:19 +00:00

Trivial fixes (#33304) (#33312)

Backport #33304

The only conflict is caused by `templates/shared/issueicon.tmpl`
This commit is contained in:
wxiaoguang
2025-01-18 03:09:17 +08:00
committed by GitHub
parent 52d298890b
commit bf664c2e85
12 changed files with 52 additions and 43 deletions

View File

@@ -855,7 +855,7 @@ func Run(ctx *context_module.Context) {
inputs := make(map[string]any)
if workflowDispatch := workflow.WorkflowDispatchConfig(); workflowDispatch != nil {
for name, config := range workflowDispatch.Inputs {
value := ctx.Req.PostForm.Get(name)
value := ctx.Req.PostFormValue(name)
if config.Type == "boolean" {
// https://www.w3.org/TR/html401/interact/forms.html
// https://stackoverflow.com/questions/11424037/do-checkbox-inputs-only-post-data-if-theyre-checked

View File

@@ -109,7 +109,7 @@ func RemoveDependency(ctx *context.Context) {
}
// Dependency Type
depTypeStr := ctx.Req.PostForm.Get("dependencyType")
depTypeStr := ctx.Req.PostFormValue("dependencyType")
var depType issues_model.DependencyType

View File

@@ -46,7 +46,7 @@ func IssueWatch(ctx *context.Context) {
return
}
watch, err := strconv.ParseBool(ctx.Req.PostForm.Get("watch"))
watch, err := strconv.ParseBool(ctx.Req.PostFormValue("watch"))
if err != nil {
ctx.ServerError("watch is not bool", err)
return