mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Add AffiliationUrl.
This commit is contained in:
@ -41,6 +41,7 @@ type Application struct {
|
|||||||
ExpireInHours int `json:"expireInHours"`
|
ExpireInHours int `json:"expireInHours"`
|
||||||
SignupUrl string `xorm:"varchar(100)" json:"signupUrl"`
|
SignupUrl string `xorm:"varchar(100)" json:"signupUrl"`
|
||||||
ForgetUrl string `xorm:"varchar(100)" json:"forgetUrl"`
|
ForgetUrl string `xorm:"varchar(100)" json:"forgetUrl"`
|
||||||
|
AffiliationUrl string `xorm:"varchar(100)" json:"affiliationUrl"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetApplications(owner string) []*Application {
|
func GetApplications(owner string) []*Application {
|
||||||
|
@ -256,6 +256,16 @@ class ApplicationEditPage extends React.Component {
|
|||||||
}} />
|
}} />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<Row style={{marginTop: '20px'}} >
|
||||||
|
<Col style={{marginTop: '5px'}} span={2}>
|
||||||
|
{i18next.t("general:Affiliation URL")}:
|
||||||
|
</Col>
|
||||||
|
<Col span={22} >
|
||||||
|
<Input prefix={<LinkOutlined/>} value={this.state.application.affiliationUrl} onChange={e => {
|
||||||
|
this.updateApplicationField('affiliationUrl', e.target.value);
|
||||||
|
}} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<Row style={{marginTop: '20px'}} >
|
<Row style={{marginTop: '20px'}} >
|
||||||
<Col style={{marginTop: '5px'}} span={2}>
|
<Col style={{marginTop: '5px'}} span={2}>
|
||||||
{i18next.t("general:Providers")}:
|
{i18next.t("general:Providers")}:
|
||||||
|
@ -286,9 +286,17 @@ class UserEditPage extends React.Component {
|
|||||||
{i18next.t("user:Affiliation")}:
|
{i18next.t("user:Affiliation")}:
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
|
{
|
||||||
|
this.state.application?.affiliationUrl === "" ? (
|
||||||
<Input value={this.state.user.affiliation} onChange={e => {
|
<Input value={this.state.user.affiliation} onChange={e => {
|
||||||
this.updateUserField('affiliation', e.target.value);
|
this.updateUserField('affiliation', e.target.value);
|
||||||
}} />
|
}} />
|
||||||
|
) : (
|
||||||
|
<Button key="home" onClick={() => Setting.goToLink(this.state.application.affiliationUrl)}>
|
||||||
|
{`${i18next.t("user:Modify affiliation")}...`}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{marginTop: '20px'}} >
|
<Row style={{marginTop: '20px'}} >
|
||||||
|
@ -114,6 +114,7 @@
|
|||||||
"Set password...": "Set password...",
|
"Set password...": "Set password...",
|
||||||
"Modify password...": "Modify password...",
|
"Modify password...": "Modify password...",
|
||||||
"Affiliation": "Affiliation",
|
"Affiliation": "Affiliation",
|
||||||
|
"Modify affiliation": "Modify affiliation",
|
||||||
"Tag": "Tag",
|
"Tag": "Tag",
|
||||||
"Third-party logins": "Third-party logins",
|
"Third-party logins": "Third-party logins",
|
||||||
"Link": "Link",
|
"Link": "Link",
|
||||||
|
@ -114,6 +114,7 @@
|
|||||||
"Set password...": "设置密码...",
|
"Set password...": "设置密码...",
|
||||||
"Modify password...": "修改密码...",
|
"Modify password...": "修改密码...",
|
||||||
"Affiliation": "工作单位",
|
"Affiliation": "工作单位",
|
||||||
|
"Modify affiliation": "修改工作单位",
|
||||||
"Tag": "标签",
|
"Tag": "标签",
|
||||||
"Third-party logins": "第三方登录",
|
"Third-party logins": "第三方登录",
|
||||||
"Link": "绑定",
|
"Link": "绑定",
|
||||||
|
Reference in New Issue
Block a user