diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-05-08 23:39:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-08 15:39:13 +0000 |
commit | 3fdb2d4ad8a3bf4c5fbcc417a274be2fc695882b (patch) | |
tree | c67abd9c21b15641977697e7eab724086f682c86 /templates | |
parent | f09e68ec33262d5356779572a0b1c66e6e86590f (diff) | |
download | gitea-3fdb2d4ad8a3bf4c5fbcc417a274be2fc695882b.tar.gz gitea-3fdb2d4ad8a3bf4c5fbcc417a274be2fc695882b.zip |
Fix incorrect issue form (#30881)
Fix #30864
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/branch_selector_field.tmpl | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl index cbf7929fdb..5793a8bfda 100644 --- a/templates/repo/issue/branch_selector_field.tmpl +++ b/templates/repo/issue/branch_selector_field.tmpl @@ -1,12 +1,8 @@ {{if and (not .Issue.IsPull) (not .PageIsComparePull)}} <input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}"> -<input id="editing_mode" name="edit_mode" type="hidden" value="{{(or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}"> -<form method="post" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form"> - {{$.CsrfTokenHtml}} -</form> <div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}" data-no-results="{{ctx.Locale.Tr "no_results_found"}}" - {{if not .Issue}}data-for-new-issue="true"{{end}} + {{if and .Issue (or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}data-url-update-issueref="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref"{{end}} > <div class="ui button branch-dropdown-button"> <span class="text-branch-name gt-ellipsis">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span> |