From 9928a286ec35eaac15df7b2fec1f97c5ee12c457 Mon Sep 17 00:00:00 2001 From: sillyguodong Date: Thu, 23 Mar 2023 18:55:32 +0800 Subject: [PATCH 1/4] Fix buttons in project edit page not work --- routers/web/org/projects.go | 1 + routers/web/repo/projects.go | 1 + templates/projects/new.tmpl | 2 +- templates/repo/projects/new.tmpl | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go index df16d0a4c762..4b30b770e9e6 100644 --- a/routers/web/org/projects.go +++ b/routers/web/org/projects.go @@ -245,6 +245,7 @@ func EditProject(ctx *context.Context) { return } + ctx.Data["projectID"] = p.ID ctx.Data["title"] = p.Title ctx.Data["content"] = p.Description ctx.Data["redirect"] = ctx.FormString("redirect") diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go index e15f548a38dc..91e17dee295f 100644 --- a/routers/web/repo/projects.go +++ b/routers/web/repo/projects.go @@ -232,6 +232,7 @@ func EditProject(ctx *context.Context) { return } + ctx.Data["projectID"] = p.ID ctx.Data["title"] = p.Title ctx.Data["content"] = p.Description ctx.Data["card_type"] = p.CardType diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl index 826869ac5daa..a8f549c1e0a1 100644 --- a/templates/projects/new.tmpl +++ b/templates/projects/new.tmpl @@ -50,7 +50,7 @@
{{if .PageIsEditProjects}} - + {{.locale.Tr "repo.milestones.cancel"}}