File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,14 @@ const (
2727// Create render the page for create organization
2828func Create (ctx * context.Context ) {
2929ctx .Data ["Title" ] = ctx .Tr ("new_org" )
30- ctx .Data ["DefaultOrgVisibilityMode" ] = setting .Service .DefaultOrgVisibilityMode
3130if ! ctx .Doer .CanCreateOrganization () {
3231ctx .ServerError ("Not allowed" , errors .New (ctx .Locale .TrString ("org.form.create_org_not_allowed" )))
3332return
3433}
34+
35+ ctx .Data ["visibility" ] = setting .Service .DefaultOrgVisibilityMode
36+ ctx .Data ["repo_admin_change_team_access" ] = true
37+
3538ctx .HTML (http .StatusOK , tplCreateOrg )
3639}
3740
Original file line number Diff line number Diff line change 1818<label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label>
1919<div class="inline-right">
2020<div class="ui radio checkbox">
21- <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode .IsPublic}}checked{{end}}>
21+ <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .visibility .IsPublic}}checked{{end}}>
2222<label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
2323</div>
2424<div class="ui radio checkbox">
25- <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode .IsLimited}}checked{{end}}>
25+ <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .visibility .IsLimited}}checked{{end}}>
2626<label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
2727</div>
2828<div class="ui radio checkbox">
29- <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode .IsPrivate}}checked{{end}}>
29+ <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .visibility .IsPrivate}}checked{{end}}>
3030<label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
3131</div>
3232</div>
3535<div class="inline field" id="permission_box">
3636<label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
3737<div class="ui checkbox">
38- <input type="checkbox" name="repo_admin_change_team_access" checked>
38+ <input type="checkbox" name="repo_admin_change_team_access" {{if .repo_admin_change_team_access}} checked{{end}} >
3939<label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
4040</div>
4141</div>
You can’t perform that action at this time.
0 commit comments