New repo: Rework initialization

- only show settings when ticked
- only offer README selection when there are multiple options

(cherry picked from commit 8d32ca32c2)
This commit is contained in:
Otto Richter 2024-12-27 16:11:45 +01:00 committed by forgejo-backport-action
parent 023aaef2b9
commit 662b385596
4 changed files with 67 additions and 58 deletions

View file

@ -43,7 +43,7 @@ func assertRepoCreateForm(t *testing.T, htmlDoc *HTMLDoc, owner *user_model.User
// the template menu is loaded client-side, so don't assert the option exists
assert.Equal(t, templateID, htmlDoc.GetInputValueByName("repo_template"), "Unexpected repo_template selection")
for _, name := range []string{"issue_labels", "gitignores", "license", "readme", "object_format_name"} {
for _, name := range []string{"issue_labels", "gitignores", "license", "object_format_name"} {
htmlDoc.AssertDropdownHasOptions(t, name)
}
}