1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Dynamically get marketplace name for submit button

This commit is contained in:
Brett Sun 2015-11-24 18:18:49 +01:00
parent 47f56b5505
commit e228a4bf15

View File

@ -91,6 +91,7 @@ let MarketSubmitButton = React.createClass({
render() {
const { availableAcls, currentUser, className, editions, handleSuccess } = this.props;
const { whitelabel } = this.state;
const { solePieceId, canSubmit } = this.getAggregateEditionDetails();
const message = getAclFormMessage({
aclName: 'acl_consign',
@ -102,14 +103,14 @@ let MarketSubmitButton = React.createClass({
const triggerButton = (
<button className={classNames('btn', 'btn-default', 'btn-sm', className)}>
{getLangText('CONSIGN TO TODO')}
{getLangText('CONSIGN TO %s', whitelabel.name.toUpperCase())}
</button>
);
const consignForm = (
<AclFormFactory
action='acl_consign'
autoFocusProperty='message'
email={this.state.whitelabel.user}
email={whitelabel.user}
message={message}
labels={{
'message': getLangText('Message (also suggest a sales price if necessary)')
@ -147,7 +148,7 @@ let MarketSubmitButton = React.createClass({
<ModalWrapper
trigger={triggerButton}
handleSuccess={handleSuccess}
title={getLangText('Consign artwork to TODO')}>
title={getLangText('Consign artwork to %s', whitelabel.name)}>
{consignForm}
</ModalWrapper>
</AclProxy>