mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-09 01:13:41 +08:00
Add Prompted field.
This commit is contained in:
@ -19,6 +19,7 @@ type ProviderItem struct {
|
|||||||
CanSignUp bool `json:"canSignUp"`
|
CanSignUp bool `json:"canSignUp"`
|
||||||
CanSignIn bool `json:"canSignIn"`
|
CanSignIn bool `json:"canSignIn"`
|
||||||
CanUnlink bool `json:"canUnlink"`
|
CanUnlink bool `json:"canUnlink"`
|
||||||
|
Prompted bool `json:"prompted"`
|
||||||
AlertType string `json:"alertType"`
|
AlertType string `json:"alertType"`
|
||||||
Provider *Provider `json:"provider"`
|
Provider *Provider `json:"provider"`
|
||||||
}
|
}
|
||||||
|
@ -18,5 +18,6 @@ type SignupItem struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Visible bool `json:"visible"`
|
Visible bool `json:"visible"`
|
||||||
Required bool `json:"required"`
|
Required bool `json:"required"`
|
||||||
|
Prompted bool `json:"prompted"`
|
||||||
Rule string `json:"rule"`
|
Rule string `json:"rule"`
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,19 @@ class ProviderTable extends React.Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: i18next.t("provider:prompted"),
|
||||||
|
dataIndex: 'prompted',
|
||||||
|
key: 'prompted',
|
||||||
|
width: '120px',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return (
|
||||||
|
<Switch checked={text} onChange={checked => {
|
||||||
|
this.updateField(table, index, 'prompted', checked);
|
||||||
|
}} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:alertType"),
|
title: i18next.t("provider:alertType"),
|
||||||
dataIndex: 'alertType',
|
dataIndex: 'alertType',
|
||||||
|
@ -102,6 +102,8 @@ class SignupTable extends React.Component {
|
|||||||
this.updateField(table, index, 'visible', checked);
|
this.updateField(table, index, 'visible', checked);
|
||||||
if (!checked) {
|
if (!checked) {
|
||||||
this.updateField(table, index, 'required', false);
|
this.updateField(table, index, 'required', false);
|
||||||
|
} else {
|
||||||
|
this.updateField(table, index, 'required', true);
|
||||||
}
|
}
|
||||||
}} />
|
}} />
|
||||||
)
|
)
|
||||||
@ -124,6 +126,23 @@ class SignupTable extends React.Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: i18next.t("provider:prompted"),
|
||||||
|
dataIndex: 'prompted',
|
||||||
|
key: 'prompted',
|
||||||
|
width: '120px',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
if (record.visible) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Switch checked={text} onChange={checked => {
|
||||||
|
this.updateField(table, index, 'prompted', checked);
|
||||||
|
}} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:rule"),
|
title: i18next.t("provider:rule"),
|
||||||
dataIndex: 'rule',
|
dataIndex: 'rule',
|
||||||
|
Reference in New Issue
Block a user