mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
fix: preserve object format dropdown options on /repo/create error (#4360)
To reproduce: - make the repo creation form return with an error, like a duplicate name - click on the Object format dropdown - the options are missing as the listbox is empty Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4360 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Solomon Victorino <git@solomonvictorino.com> Co-committed-by: Solomon Victorino <git@solomonvictorino.com>
This commit is contained in:
parent
8e56f61d0f
commit
df22f8da5f
4 changed files with 89 additions and 21 deletions
|
@ -231,6 +231,8 @@ func CreatePost(ctx *context.Context) {
|
|||
|
||||
ctx.Data["CanCreateRepo"] = ctx.Doer.CanCreateRepo()
|
||||
ctx.Data["MaxCreationLimit"] = ctx.Doer.MaxCreationLimit()
|
||||
ctx.Data["SupportedObjectFormats"] = git.SupportedObjectFormats
|
||||
ctx.Data["DefaultObjectFormat"] = git.Sha1ObjectFormat
|
||||
|
||||
ctxUser := checkContextUser(ctx, form.UID)
|
||||
if ctx.Written() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue