diff --git a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js
index d75282af..a4b1b7c3 100644
--- a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js
+++ b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js
@@ -91,7 +91,7 @@ let MarketSubmitButton = React.createClass({
render() {
const { availableAcls, currentUser, className, editions, handleSuccess } = this.props;
- const { whitelabel } = this.state;
+ const { whitelabel: { name: whitelabelName = 'Market', user: whitelabelAdminEmail } } = this.state;
const { solePieceId, canSubmit } = this.getAggregateEditionDetails();
const message = getAclFormMessage({
aclName: 'acl_consign',
@@ -103,14 +103,14 @@ let MarketSubmitButton = React.createClass({
const triggerButton = (
);
const consignForm = (
+ title={getLangText('Consign artwork to %s', whitelabelName)}>
{consignForm}
diff --git a/js/components/whitelabel/wallet/components/market/market_piece_list.js b/js/components/whitelabel/wallet/components/market/market_piece_list.js
index 8ffab5a5..647a84be 100644
--- a/js/components/whitelabel/wallet/components/market/market_piece_list.js
+++ b/js/components/whitelabel/wallet/components/market/market_piece_list.js
@@ -49,19 +49,25 @@ let MarketPieceList = React.createClass({
},
render() {
- const { currentUser, whitelabel } = this.state;
+ const {
+ currentUser: { email: userEmail },
+ whitelabel: {
+ name: whitelabelName = 'Market',
+ user: whitelabelAdminEmail
+ } } = this.state;
+
let filterParams = null;
let canLoadPieceList = false;
- if (currentUser.email && whitelabel.user) {
+ if (userEmail && whitelabelAdminEmail) {
canLoadPieceList = true;
- const isUserAdmin = currentUser.email === whitelabel.user;
+ const isUserAdmin = userEmail === whitelabelAdminEmail;
filterParams = [{
label: getLangText('Show works I can'),
items: [{
key: isUserAdmin ? 'acl_transfer' : 'acl_consign',
- label: getLangText(isUserAdmin ? 'transfer' : 'consign to %s', whitelabel.name),
+ label: getLangText(isUserAdmin ? 'transfer' : 'consign to %s', whitelabelName),
defaultValue: true
}]
}];
diff --git a/js/components/whitelabel/wallet/components/market/market_register_piece.js b/js/components/whitelabel/wallet/components/market/market_register_piece.js
index 3572fd6d..e02df80c 100644
--- a/js/components/whitelabel/wallet/components/market/market_register_piece.js
+++ b/js/components/whitelabel/wallet/components/market/market_register_piece.js
@@ -11,11 +11,13 @@ import MarketAdditionalDataForm from './market_forms/market_additional_data_form
import Property from '../../../../ascribe_forms/property';
import RegisterPieceForm from '../../../../ascribe_forms/form_register_piece';
-import UserStore from '../../../../../stores/user_store';
-import UserActions from '../../../../../actions/user_actions';
import PieceActions from '../../../../../actions/piece_actions';
import PieceListStore from '../../../../../stores/piece_list_store';
import PieceListActions from '../../../../../actions/piece_list_actions';
+import UserStore from '../../../../../stores/user_store';
+import UserActions from '../../../../../actions/user_actions';
+import WhitelabelActions from '../../../../../actions/whitelabel_actions';
+import WhitelabelStore from '../../../../../stores/whitelabel_store';
import SlidesContainer from '../../../../ascribe_slides_container/slides_container';
@@ -32,8 +34,9 @@ let MarketRegisterPiece = React.createClass({
getInitialState(){
return mergeOptions(
- UserStore.getState(),
PieceListStore.getState(),
+ UserStore.getState(),
+ WhitelabelStore.getState(),
{
step: 0
});
@@ -42,7 +45,10 @@ let MarketRegisterPiece = React.createClass({
componentDidMount() {
PieceListStore.listen(this.onChange);
UserStore.listen(this.onChange);
+ WhitelabelStore.listen(this.onChange);
+
UserActions.fetchCurrentUser();
+ WhitelabelActions.fetchWhitelabel();
// Reset the piece store to make sure that we don't display old data
// if the user repeatedly registers works
@@ -52,6 +58,7 @@ let MarketRegisterPiece = React.createClass({
componentWillUnmount() {
PieceListStore.unlisten(this.onChange);
UserStore.unlisten(this.onChange);
+ WhitelabelStore.unlisten(this.onChange);
},
onChange(state) {
@@ -107,6 +114,13 @@ let MarketRegisterPiece = React.createClass({
},
render() {
+ const {
+ isFineUploaderActive,
+ step,
+ whitelabel: {
+ name: whitelabelName = 'Market'
+ } } = this.state;
+
setDocumentTitle(getLangText('Register a new piece'));
return (
@@ -122,9 +136,9 @@ let MarketRegisterPiece = React.createClass({
0}
+ disabled={step > 0}
enableLocalHashing={false}
- headerMessage={getLangText('Consign to Market')}
+ headerMessage={getLangText('Consign to %s', whitelabelName)}
submitMessage={getLangText('Proceed to additional details')}
isFineUploaderActive={true}
handleSuccess={this.handleRegisterSuccess}