From 7da1e4196e1b883034c42e6ffc0062f0177d1009 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 13 Jul 2022 17:34:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=A8=A1=E6=9D=BF=E6=97=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/repo.go | 3 +++ templates/repo/create.tmpl | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/routers/repo/repo.go b/routers/repo/repo.go index c0803ed06..03d2d832a 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -195,8 +195,11 @@ func CreatePost(ctx *context.Context, form auth.CreateRepoForm) { } ctx.Data["ContextUser"] = ctxUser if !form.AutoAgree { + ctx.Data["CheckedAutoAgree"] = "" ctx.RenderWithErr(ctx.Tr("repo.template.one_promise"), tplCreate, form) return + } else { + ctx.Data["CheckedAutoAgree"] = "checked" } if ctx.HasError() { ctx.HTML(200, tplCreate) diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index cf4c1a16a..be1f292d0 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -81,7 +81,7 @@
-
+
-
+