Skip to content

Commit 7a35f90

Browse files
authored
Fix broken forms (#33082)
1 parent d371aa3 commit 7a35f90

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

routers/web/repo/repo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,12 @@ func CreatePost(ctx *context.Context) {
228228
ctx.Data["Licenses"] = repo_module.Licenses
229229
ctx.Data["Readmes"] = repo_module.Readmes
230230

231+
// the logic is still buggy, the complete fix is in 1.24
232+
ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate
231233
ctx.Data["CanCreateRepo"] = ctx.Doer.CanCreateRepo()
232234
ctx.Data["MaxCreationLimit"] = ctx.Doer.MaxCreationLimit()
235+
ctx.Data["SupportedObjectFormats"] = git.DefaultFeatures().SupportedObjectFormats
236+
ctx.Data["DefaultObjectFormat"] = git.Sha1ObjectFormat
233237

234238
ctxUser := checkContextUser(ctx, form.UID)
235239
if ctx.Written() {

web_src/css/form.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ textarea:focus,
483483
margin-bottom: 1em;
484484
width: 100%;
485485
}
486-
.new.org .ui.form .field input {
486+
.new.org .ui.form .field input:not([type="checkbox"], [type="radio"]) {
487487
width: 100% !important;
488488
}
489489
}

0 commit comments

Comments
 (0)