mirror of
https://github.com/ascribe/onion.git
synced 2024-12-31 17:17:48 +01:00
Dynamically get marketplace name for submit button
This commit is contained in:
parent
47f56b5505
commit
e228a4bf15
@ -91,6 +91,7 @@ let MarketSubmitButton = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { availableAcls, currentUser, className, editions, handleSuccess } = this.props;
|
const { availableAcls, currentUser, className, editions, handleSuccess } = this.props;
|
||||||
|
const { whitelabel } = this.state;
|
||||||
const { solePieceId, canSubmit } = this.getAggregateEditionDetails();
|
const { solePieceId, canSubmit } = this.getAggregateEditionDetails();
|
||||||
const message = getAclFormMessage({
|
const message = getAclFormMessage({
|
||||||
aclName: 'acl_consign',
|
aclName: 'acl_consign',
|
||||||
@ -102,14 +103,14 @@ let MarketSubmitButton = React.createClass({
|
|||||||
|
|
||||||
const triggerButton = (
|
const triggerButton = (
|
||||||
<button className={classNames('btn', 'btn-default', 'btn-sm', className)}>
|
<button className={classNames('btn', 'btn-default', 'btn-sm', className)}>
|
||||||
{getLangText('CONSIGN TO TODO')}
|
{getLangText('CONSIGN TO %s', whitelabel.name.toUpperCase())}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
const consignForm = (
|
const consignForm = (
|
||||||
<AclFormFactory
|
<AclFormFactory
|
||||||
action='acl_consign'
|
action='acl_consign'
|
||||||
autoFocusProperty='message'
|
autoFocusProperty='message'
|
||||||
email={this.state.whitelabel.user}
|
email={whitelabel.user}
|
||||||
message={message}
|
message={message}
|
||||||
labels={{
|
labels={{
|
||||||
'message': getLangText('Message (also suggest a sales price if necessary)')
|
'message': getLangText('Message (also suggest a sales price if necessary)')
|
||||||
@ -147,7 +148,7 @@ let MarketSubmitButton = React.createClass({
|
|||||||
<ModalWrapper
|
<ModalWrapper
|
||||||
trigger={triggerButton}
|
trigger={triggerButton}
|
||||||
handleSuccess={handleSuccess}
|
handleSuccess={handleSuccess}
|
||||||
title={getLangText('Consign artwork to TODO')}>
|
title={getLangText('Consign artwork to %s', whitelabel.name)}>
|
||||||
{consignForm}
|
{consignForm}
|
||||||
</ModalWrapper>
|
</ModalWrapper>
|
||||||
</AclProxy>
|
</AclProxy>
|
||||||
|
Loading…
Reference in New Issue
Block a user