mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
Improve enableAutoSignin option UI
This commit is contained in:
parent
23dbb0b926
commit
91268bca70
@ -456,6 +456,10 @@ class ApplicationEditPage extends React.Component {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={1} >
|
<Col span={1} >
|
||||||
<Switch checked={this.state.application.enableSigninSession} onChange={checked => {
|
<Switch checked={this.state.application.enableSigninSession} onChange={checked => {
|
||||||
|
if (!checked) {
|
||||||
|
this.updateApplicationField("enableAutoSignin", false);
|
||||||
|
}
|
||||||
|
|
||||||
this.updateApplicationField("enableSigninSession", checked);
|
this.updateApplicationField("enableSigninSession", checked);
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
@ -466,6 +470,11 @@ class ApplicationEditPage extends React.Component {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={1} >
|
<Col span={1} >
|
||||||
<Switch checked={this.state.application.enableAutoSignin} onChange={checked => {
|
<Switch checked={this.state.application.enableAutoSignin} onChange={checked => {
|
||||||
|
if (!this.state.application.enableSigninSession && checked) {
|
||||||
|
Setting.showMessage("error", i18next.t("application:Please enable \"Signin session\" first before enabling \"Auto signin\""));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.updateApplicationField("enableAutoSignin", checked);
|
this.updateApplicationField("enableAutoSignin", checked);
|
||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user