1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00

Change additional form's button text when not in registration flow

This commit is contained in:
Brett Sun 2015-12-02 18:18:20 +01:00
parent 8f14b27eac
commit 4664a48898
2 changed files with 11 additions and 3 deletions

View File

@ -129,7 +129,8 @@ let MarketSubmitButton = React.createClass({
handleSuccess={this.handleAdditionalDataSuccess.bind(this, solePieceId)}
title={getLangText('Add additional information')}>
<MarketAdditionalDataForm
pieceId={solePieceId} />
pieceId={solePieceId}
submitLabel={getLangText('Continue to consignment')} />
</ModalWrapper>
<ModalWrapper

View File

@ -35,9 +35,16 @@ let MarketAdditionalDataForm = React.createClass({
isInline: React.PropTypes.bool,
showHeading: React.PropTypes.bool,
showNotification: React.PropTypes.bool,
submitLabel: React.PropTypes.bool,
handleSuccess: React.PropTypes.func
},
getDefaultProps() {
return {
submitLabel: getLangText('Register work')
};
},
getInitialState() {
const pieceStore = PieceStore.getState();
@ -123,7 +130,7 @@ let MarketAdditionalDataForm = React.createClass({
},
render() {
const { isInline, handleSuccess, showHeading, showNotification } = this.props;
const { isInline, handleSuccess, showHeading, showNotification, submitLabel } = this.props;
const { piece } = this.state;
let buttons, spinner, heading;
@ -133,7 +140,7 @@ let MarketAdditionalDataForm = React.createClass({
type="submit"
className="btn btn-default btn-wide"
disabled={!this.state.isUploadReady}>
{getLangText('Register work')}
{submitLabel}
</button>
);