use accessiblebutton
parent
7a9246533d
commit
31fd36efba
|
@ -128,7 +128,9 @@ export default class SetIdServer extends React.Component {
|
||||||
return !!this.state.idServer && !this.state.busy;
|
return !!this.state.idServer && !this.state.busy;
|
||||||
};
|
};
|
||||||
|
|
||||||
_saveIdServer = async () => {
|
_saveIdServer = async (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
this.setState({busy: true});
|
this.setState({busy: true});
|
||||||
|
|
||||||
const fullUrl = unabbreviateUrl(this.state.idServer);
|
const fullUrl = unabbreviateUrl(this.state.idServer);
|
||||||
|
@ -171,6 +173,7 @@ export default class SetIdServer extends React.Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
return (
|
return (
|
||||||
<form className="mx_SettingsTab_section mx_SetIdServer" onSubmit={this._saveIdServer}>
|
<form className="mx_SettingsTab_section mx_SetIdServer" onSubmit={this._saveIdServer}>
|
||||||
<span className="mx_SettingsTab_subheading">
|
<span className="mx_SettingsTab_subheading">
|
||||||
|
@ -185,10 +188,10 @@ export default class SetIdServer extends React.Component {
|
||||||
onChange={this._onIdentityServerChanged}
|
onChange={this._onIdentityServerChanged}
|
||||||
tooltipContent={this._getTooltip()}
|
tooltipContent={this._getTooltip()}
|
||||||
/>
|
/>
|
||||||
<input className="mx_Dialog_primary"
|
<AccessibleButton type="submit" kind="primary_sm"
|
||||||
type="submit" value={_t("Change")}
|
|
||||||
disabled={!this._idServerChangeEnabled()}
|
disabled={!this._idServerChangeEnabled()}
|
||||||
/>
|
onClick={this._saveIdServer}
|
||||||
|
>{_t("Change")}</AccessibleButton>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue