summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2024-03-03 04:01:19 +0800
committerGitHub <noreply@github.com>2024-03-02 20:01:19 +0000
commit971eab18fa0b29312105df739fba443cf9e84d50 (patch)
treef58b69eb68adaac54f8d958989125c7da54ff2cd /templates
parent86cd94cba6d63c84528f6f8d52b1ec22b44ac2f8 (diff)
downloadgitea-971eab18fa0b29312105df739fba443cf9e84d50.tar.gz
gitea-971eab18fa0b29312105df739fba443cf9e84d50.zip
Fix incorrect redirection when creating a PR fails (#29537) (#29543)
Backport #29537 by wxiaoguang This is only a quick fix to make it easier to backport. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/compare.tmpl8
-rw-r--r--templates/repo/issue/new.tmpl8
-rw-r--r--templates/repo/issue/new_form.tmpl8
3 files changed, 3 insertions, 21 deletions
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl
index 3e5df17f22..4e13eddde3 100644
--- a/templates/repo/diff/compare.tmpl
+++ b/templates/repo/diff/compare.tmpl
@@ -11,14 +11,6 @@
{{ctx.Locale.Tr "action.compare_commits_general"}}
{{end}}
</h2>
- {{if .Flash.WarningMsg}}
- {{/*
- There's already an importing of alert.tmpl in new_form.tmpl,
- but only the negative message will be displayed within forms for some reasons, see semantic.css:10659.
- To avoid repeated negative messages, the importing here if for .Flash.WarningMsg only.
- */}}
- {{template "base/alert" .}}
- {{end}}
{{$BaseCompareName := $.BaseName -}}
{{- $HeadCompareName := $.HeadRepo.OwnerName -}}
{{- if and (eq $.BaseName $.HeadRepo.OwnerName) (ne $.Repository.Name $.HeadRepo.Name) -}}
diff --git a/templates/repo/issue/new.tmpl b/templates/repo/issue/new.tmpl
index 780e874bc6..ccd45fdebe 100644
--- a/templates/repo/issue/new.tmpl
+++ b/templates/repo/issue/new.tmpl
@@ -2,14 +2,6 @@
<div role="main" aria-label="{{.Title}}" class="page-content repository new issue">
{{template "repo/header" .}}
<div class="ui container">
- {{if .Flash.WarningMsg}}
- {{/*
- There's already an importing of alert.tmpl in new_form.tmpl,
- but only the negative message will be displayed within forms for some reasons, see semantic.css:10659.
- To avoid repeated negative messages, the importing here if for .Flash.WarningMsg only.
- */}}
- {{template "base/alert" .}}
- {{end}}
{{template "repo/issue/new_form" .}}
</div>
</div>
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index 04ae8456bb..41eb95a4bb 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -1,10 +1,8 @@
+{{if .Flash}}
+{{template "base/alert" .}}
+{{end}}
<form class="issue-content ui comment form form-fetch-action" id="new-issue" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
- {{if .Flash}}
- <div class="sixteen wide column">
- {{template "base/alert" .}}
- </div>
- {{end}}
<div class="issue-content-left">
<div class="ui comments">
<div class="comment">