diff options
author | Giteabot <teabot@gitea.io> | 2024-02-26 17:26:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 09:26:23 +0000 |
commit | 83327e043aae4c308752f8efc88be14a98629309 (patch) | |
tree | 84c21f29d7a7872d7b113d1ffb7166c16ef1698b /templates | |
parent | 78cb09deda5a52cd7499ceb9bacf202193041edc (diff) | |
download | gitea-83327e043aae4c308752f8efc88be14a98629309.tar.gz gitea-83327e043aae4c308752f8efc88be14a98629309.zip |
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>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/editor/patch.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/editor/patch.tmpl b/templates/repo/editor/patch.tmpl index c9a78cc35f..8df8758988 100644 --- a/templates/repo/editor/patch.tmpl +++ b/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"> |