From 7a35f90b2971a7d569af14a6426db5b1c6a74c1f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 3 Jan 2025 03:57:34 +0800 Subject: [PATCH] Fix broken forms (#33082) --- routers/web/repo/repo.go | 4 ++++ web_src/css/form.css | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go index f5e59b0357b02..0b57547c9c5c4 100644 --- a/routers/web/repo/repo.go +++ b/routers/web/repo/repo.go @@ -228,8 +228,12 @@ func CreatePost(ctx *context.Context) { ctx.Data["Licenses"] = repo_module.Licenses ctx.Data["Readmes"] = repo_module.Readmes + // the logic is still buggy, the complete fix is in 1.24 + ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate ctx.Data["CanCreateRepo"] = ctx.Doer.CanCreateRepo() ctx.Data["MaxCreationLimit"] = ctx.Doer.MaxCreationLimit() + ctx.Data["SupportedObjectFormats"] = git.DefaultFeatures().SupportedObjectFormats + ctx.Data["DefaultObjectFormat"] = git.Sha1ObjectFormat ctxUser := checkContextUser(ctx, form.UID) if ctx.Written() { diff --git a/web_src/css/form.css b/web_src/css/form.css index 5dd5e05bec7f0..26f00e4d994e9 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -483,7 +483,7 @@ textarea:focus, margin-bottom: 1em; width: 100%; } - .new.org .ui.form .field input { + .new.org .ui.form .field input:not([type="checkbox"], [type="radio"]) { width: 100% !important; } }