aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/patch.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-02-14 17:18:55 +0800
committerGitHub <noreply@github.com>2022-02-14 09:18:55 +0000
commit08fe6f8c7ee4b446ae489843414d237cf3e458b5 (patch)
tree3856aa0af03cdf698e3ac7e069d7d2e50ea968b1 /routers/web/repo/patch.go
parent581a563cac5e910510f4f5cc54ccb4478193846f (diff)
downloadgitea-08fe6f8c7ee4b446ae489843414d237cf3e458b5.tar.gz
gitea-08fe6f8c7ee4b446ae489843414d237cf3e458b5.zip
Fix broken cancel button link on patch page (#18718)
* Fix broken cacnel button link on patch page * remove treepath="patch" elsewhere too Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'routers/web/repo/patch.go')
-rw-r--r--routers/web/repo/patch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/patch.go b/routers/web/repo/patch.go
index b00065a6ee..e08cde89f2 100644
--- a/routers/web/repo/patch.go
+++ b/routers/web/repo/patch.go
@@ -28,7 +28,7 @@ func NewDiffPatch(ctx *context.Context) {
canCommit := renderCommitRights(ctx)
- ctx.Data["TreePath"] = "patch"
+ ctx.Data["TreePath"] = ""
ctx.Data["commit_summary"] = ""
ctx.Data["commit_message"] = ""
@@ -55,7 +55,7 @@ func NewDiffPatchPost(ctx *context.Context) {
branchName = form.NewBranchName
}
ctx.Data["RequireHighlightJS"] = true
- ctx.Data["TreePath"] = "patch"
+ ctx.Data["TreePath"] = ""
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
ctx.Data["FileContent"] = form.Content
ctx.Data["commit_summary"] = form.CommitSummary