File tree 5 files changed +22
-12
lines changed 5 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ type InstallForm struct {
42
42
DisableGravatar bool
43
43
EnableFederatedAvatar bool
44
44
EnableOpenIDSignIn bool
45
- DisableOpenIDRegistration bool
45
+ EnableOpenIDSignUp bool
46
46
DisableRegistration bool
47
47
EnableCaptcha bool
48
48
RequireSignInView bool
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ disable_registration = Disable Self-registration
118
118
disable_registration_popup = Disable user self-registration, only admin can create accounts.
119
119
openid_signin = Enable OpenID Sign-In
120
120
openid_signin_popup = Enable user login via OpenID
121
- disable_openid_registration = Disable OpenID Self-registration
122
- disable_openid_registration_popup = Disable OpenID based Self-registration
121
+ openid_signup = Enable OpenID Self-registration
122
+ openid_signup_popup = Enable OpenID based Self-registration
123
123
enable_captcha = Enable Captcha
124
124
enable_captcha_popup = Require a CAPTCHA for user self-registration.
125
125
require_sign_in_view = Enable Require Sign In to View Pages
Original file line number Diff line number Diff line change @@ -311,12 +311,22 @@ function initInstall() {
311
311
$ ( '#offline-mode' ) . checkbox ( 'uncheck' ) ;
312
312
}
313
313
} ) ;
314
+ $ ( '#enable-openid-signin input' ) . change ( function ( ) {
315
+ if ( $ ( this ) . is ( ':checked' ) ) {
316
+ if ( $ ( '#disable-registration input' ) . is ( ':checked' ) ) {
317
+ } else {
318
+ $ ( '#enable-openid-signup' ) . checkbox ( 'check' ) ;
319
+ }
320
+ } else {
321
+ $ ( '#enable-openid-signup' ) . checkbox ( 'uncheck' ) ;
322
+ }
323
+ } ) ;
314
324
$ ( '#disable-registration input' ) . change ( function ( ) {
315
325
if ( $ ( this ) . is ( ':checked' ) ) {
316
326
$ ( '#enable-captcha' ) . checkbox ( 'uncheck' ) ;
317
- $ ( '#disable -openid-registration ' ) . checkbox ( 'check ' ) ;
327
+ $ ( '#enable -openid-signup ' ) . checkbox ( 'uncheck ' ) ;
318
328
} else {
319
- $ ( '#disable -openid-registration ' ) . checkbox ( 'uncheck ' ) ;
329
+ $ ( '#enable -openid-signup ' ) . checkbox ( 'check ' ) ;
320
330
}
321
331
} ) ;
322
332
$ ( '#enable-captcha input' ) . change ( function ( ) {
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ func Install(ctx *context.Context) {
108
108
form .OfflineMode = setting .OfflineMode
109
109
form .DisableGravatar = setting .DisableGravatar
110
110
form .EnableFederatedAvatar = setting .EnableFederatedAvatar
111
- form .EnableOpenIDSignIn = true // setting.Service.EnableOpenIDSignIn
112
- form .DisableOpenIDRegistration = ! setting . Service . EnableOpenIDSignUp
111
+ form .EnableOpenIDSignIn = true
112
+ form .EnableOpenIDSignUp = true
113
113
form .DisableRegistration = setting .Service .DisableRegistration
114
114
form .EnableCaptcha = setting .Service .EnableCaptcha
115
115
form .RequireSignInView = setting .Service .RequireSignInView
@@ -295,7 +295,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
295
295
cfg .Section ("picture" ).Key ("DISABLE_GRAVATAR" ).SetValue (com .ToStr (form .DisableGravatar ))
296
296
cfg .Section ("picture" ).Key ("ENABLE_FEDERATED_AVATAR" ).SetValue (com .ToStr (form .EnableFederatedAvatar ))
297
297
cfg .Section ("openid" ).Key ("ENABLE_OPENID_SIGNIN" ).SetValue (com .ToStr (form .EnableOpenIDSignIn ))
298
- cfg .Section ("openid" ).Key ("ENABLE_OPENID_SIGNUP" ).SetValue (com .ToStr (! form .DisableOpenIDRegistration ))
298
+ cfg .Section ("openid" ).Key ("ENABLE_OPENID_SIGNUP" ).SetValue (com .ToStr (form .EnableOpenIDSignUp ))
299
299
cfg .Section ("service" ).Key ("DISABLE_REGISTRATION" ).SetValue (com .ToStr (form .DisableRegistration ))
300
300
cfg .Section ("service" ).Key ("ENABLE_CAPTCHA" ).SetValue (com .ToStr (form .EnableCaptcha ))
301
301
cfg .Section ("service" ).Key ("REQUIRE_SIGNIN_VIEW" ).SetValue (com .ToStr (form .RequireSignInView ))
Original file line number Diff line number Diff line change 189
189
</div>
190
190
</div>
191
191
<div class="inline field">
192
- <div class="ui checkbox" id="openid-signin">
192
+ <div class="ui checkbox" id="enable- openid-signin">
193
193
<label class="poping up" data-content="{{.i18n.Tr "install.openid_signin_popup"}}"><strong>{{.i18n.Tr "install.openid_signin"}}</strong></label>
194
194
<input name="enable_open_id_sign_in" type="checkbox" {{if .enable_open_id_sign_in}}checked{{end}}>
195
195
</div>
201
201
</div>
202
202
</div>
203
203
<div class="inline field">
204
- <div class="ui checkbox" id="disable -openid-registration ">
205
- <label class="poping up" data-content="{{.i18n.Tr "install.disable_openid_registration_popup "}}"><strong>{{.i18n.Tr "install.disable_openid_registration "}}</strong></label>
206
- <input name="disable_open_id_registration " type="checkbox" {{if .disable_open_id_registration }}checked{{end}}>
204
+ <div class="ui checkbox" id="enable -openid-signup ">
205
+ <label class="poping up" data-content="{{.i18n.Tr "install.openid_signup_popup "}}"><strong>{{.i18n.Tr "install.openid_signup "}}</strong></label>
206
+ <input name="enable_open_id_sign_up " type="checkbox" {{if .enable_open_id_sign_up }}checked{{end}}>
207
207
</div>
208
208
</div>
209
209
<div class="inline field">
You can’t perform that action at this time.
0 commit comments