mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Make PR form use toast to show error message (#29545)

(cherry picked from commit 27deea7330f83ddb37c918afbb4159053d8847cb)
This commit is contained in:
parent
d509031e84
commit
221a28436a
7 changed files with 35 additions and 30 deletions
|
@ -231,7 +231,7 @@ func CreateBranch(ctx *context.Context) {
|
|||
if len(e.Message) == 0 {
|
||||
ctx.Flash.Error(ctx.Tr("repo.editor.push_rejected_no_message"))
|
||||
} else {
|
||||
flashError, err := ctx.RenderToString(tplAlertDetails, map[string]any{
|
||||
flashError, err := ctx.RenderToHTML(tplAlertDetails, map[string]any{
|
||||
"Message": ctx.Tr("repo.editor.push_rejected"),
|
||||
"Summary": ctx.Tr("repo.editor.push_rejected_summary"),
|
||||
"Details": utils.SanitizeFlashErrorString(e.Message),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue