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>
This commit is contained in:
parent
581a563cac
commit
08fe6f8c7e
3 changed files with 4 additions and 4 deletions
|
@ -50,7 +50,7 @@ func CherryPick(ctx *context.Context) {
|
||||||
ctx.Data["RequireHighlightJS"] = true
|
ctx.Data["RequireHighlightJS"] = true
|
||||||
|
|
||||||
canCommit := renderCommitRights(ctx)
|
canCommit := renderCommitRights(ctx)
|
||||||
ctx.Data["TreePath"] = "patch"
|
ctx.Data["TreePath"] = ""
|
||||||
|
|
||||||
if canCommit {
|
if canCommit {
|
||||||
ctx.Data["commit_choice"] = frmCommitChoiceDirect
|
ctx.Data["commit_choice"] = frmCommitChoiceDirect
|
||||||
|
|
|
@ -28,7 +28,7 @@ func NewDiffPatch(ctx *context.Context) {
|
||||||
|
|
||||||
canCommit := renderCommitRights(ctx)
|
canCommit := renderCommitRights(ctx)
|
||||||
|
|
||||||
ctx.Data["TreePath"] = "patch"
|
ctx.Data["TreePath"] = ""
|
||||||
|
|
||||||
ctx.Data["commit_summary"] = ""
|
ctx.Data["commit_summary"] = ""
|
||||||
ctx.Data["commit_message"] = ""
|
ctx.Data["commit_message"] = ""
|
||||||
|
@ -55,7 +55,7 @@ func NewDiffPatchPost(ctx *context.Context) {
|
||||||
branchName = form.NewBranchName
|
branchName = form.NewBranchName
|
||||||
}
|
}
|
||||||
ctx.Data["RequireHighlightJS"] = true
|
ctx.Data["RequireHighlightJS"] = true
|
||||||
ctx.Data["TreePath"] = "patch"
|
ctx.Data["TreePath"] = ""
|
||||||
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
|
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
|
||||||
ctx.Data["FileContent"] = form.Content
|
ctx.Data["FileContent"] = form.Content
|
||||||
ctx.Data["commit_summary"] = form.CommitSummary
|
ctx.Data["commit_summary"] = form.CommitSummary
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="divider">:</div>
|
<div class="divider">:</div>
|
||||||
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
|
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
|
||||||
<span>{{.i18n.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.i18n.Tr "repo.editor.cancel_lower"}}</a></span>
|
<span>{{.i18n.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.i18n.Tr "repo.editor.cancel_lower"}}</a></span>
|
||||||
<input type="hidden" id="tree_path" name="tree_path" value="patch" required>
|
<input type="hidden" id="tree_path" name="tree_path" value="" required>
|
||||||
<input id="file-name" type="hidden" value="diff.patch">
|
<input id="file-name" type="hidden" value="diff.patch">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue