mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 03:00:18 +08:00
feat: limit the width of the organization.hasPrivilegeConsent popconfirm (#3869)
This commit is contained in:
@ -277,14 +277,20 @@ class OrganizationEditPage extends React.Component {
|
||||
{Setting.getLabel(i18next.t("organization:Has privilege consent"), i18next.t("organization:Has privilege consent - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={1} >
|
||||
<Popconfirm
|
||||
title={i18next.t("organization:Has privilege consent warning")}
|
||||
onConfirm={() => {this.updateOrganizationField("hasPrivilegeConsent", !this.state.organization.hasPrivilegeConsent);}}
|
||||
okText={i18next.t("general:OK")}
|
||||
cancelText={i18next.t("general:Cancel")}
|
||||
>
|
||||
<Switch checked={this.state.organization.hasPrivilegeConsent} />
|
||||
</Popconfirm>
|
||||
{
|
||||
!this.state.organization.hasPrivilegeConsent ? (
|
||||
<Popconfirm
|
||||
title={i18next.t("organization:Has privilege consent warning")}
|
||||
onConfirm={() => {this.updateOrganizationField("hasPrivilegeConsent", !this.state.organization.hasPrivilegeConsent);}}
|
||||
okText={i18next.t("general:OK")}
|
||||
cancelText={i18next.t("general:Cancel")}
|
||||
styles={{root: {width: "800px"}}}
|
||||
>
|
||||
<Switch checked={this.state.organization.hasPrivilegeConsent} />
|
||||
</Popconfirm>
|
||||
) :
|
||||
<Switch checked={this.state.organization.hasPrivilegeConsent} onChange={() => {this.updateOrganizationField("hasPrivilegeConsent", !this.state.organization.hasPrivilegeConsent);}} />
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
) : null
|
||||
|
Reference in New Issue
Block a user