Fix no cancel button just for Registration
This commit is contained in:
parent
75a4289f54
commit
c96dd9715a
2 changed files with 4 additions and 1 deletions
|
@ -70,6 +70,7 @@ export async function startAnyRegistrationFlow(options) {
|
||||||
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||||
const modal = Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
const modal = Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
||||||
hasCancelButton: true,
|
hasCancelButton: true,
|
||||||
|
quitOnly: true,
|
||||||
title: _t("Sign In or Create Account"),
|
title: _t("Sign In or Create Account"),
|
||||||
description: _t("Use your account or create a new one to continue."),
|
description: _t("Use your account or create a new one to continue."),
|
||||||
button: _t("Create Account"),
|
button: _t("Create Account"),
|
||||||
|
|
|
@ -32,6 +32,7 @@ export default createReactClass({
|
||||||
focus: PropTypes.bool,
|
focus: PropTypes.bool,
|
||||||
onFinished: PropTypes.func.isRequired,
|
onFinished: PropTypes.func.isRequired,
|
||||||
headerImage: PropTypes.string,
|
headerImage: PropTypes.string,
|
||||||
|
quitOnly: PropTypes.bool, // quitOnly doesn't show the cancel button just the quit [x].
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps: function() {
|
getDefaultProps: function() {
|
||||||
|
@ -42,6 +43,7 @@ export default createReactClass({
|
||||||
focus: true,
|
focus: true,
|
||||||
hasCancelButton: true,
|
hasCancelButton: true,
|
||||||
danger: false,
|
danger: false,
|
||||||
|
quitOnly: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@ export default createReactClass({
|
||||||
<DialogButtons primaryButton={this.props.button || _t('OK')}
|
<DialogButtons primaryButton={this.props.button || _t('OK')}
|
||||||
primaryButtonClass={primaryButtonClass}
|
primaryButtonClass={primaryButtonClass}
|
||||||
cancelButton={this.props.cancelButton}
|
cancelButton={this.props.cancelButton}
|
||||||
hasCancel={this.props.hasCancelButton}
|
hasCancel={this.props.hasCancelButton && !this.props.quitOnly}
|
||||||
onPrimaryButtonClick={this.onOk}
|
onPrimaryButtonClick={this.onOk}
|
||||||
focus={this.props.focus}
|
focus={this.props.focus}
|
||||||
onCancel={this.onCancel}
|
onCancel={this.onCancel}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue