0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-09 11:31:34 +01:00

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

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.
This commit is contained in:
wxiaoguang 2024-02-26 17:05:22 +08:00 committed by GitHub
parent f8c1efe944
commit f8974c7725
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,8 +14,8 @@
<div class="breadcrumb-divider">:</div> <div class="breadcrumb-divider">:</div>
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a> <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> <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 type="hidden" name="tree_path" value="__dummy_for_EditRepoFileForm.TreePath(Required)__">
<input id="file-name" maxlength="500" type="hidden" value="diff.patch"> <input id="file-name" type="hidden" value="diff.patch">
</div> </div>
</div> </div>
<div class="field"> <div class="field">