瀏覽代碼

Fix incorrect tree path value for patch editor (#29377) (#29421)

Backport #29377 by wxiaoguang

Regression of #18718. When submitting the form,
EditRepoFileForm.TreePath is marked as "Required", so the value can't be
empty. The value is not used by backend, so use a meaningful dummy value
for it.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
tags/v1.21.8
Giteabot 3 月之前
父節點
當前提交
83327e043a
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      templates/repo/editor/patch.tmpl

+ 2
- 2
templates/repo/editor/patch.tmpl 查看文件

@@ -14,8 +14,8 @@
<div class="breadcrumb-divider">:</div>
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
<input type="hidden" id="tree_path" name="tree_path" value="" required>
<input id="file-name" maxlength="500" type="hidden" value="diff.patch">
<input type="hidden" name="tree_path" value="__dummy_for_EditRepoFileForm.TreePath(Required)__">
<input id="file-name" type="hidden" value="diff.patch">
</div>
</div>
<div class="field">

Loading…
取消
儲存