mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
specify editions generically by whitelabel
This commit is contained in:
parent
e1af4c615f
commit
f1e90795f0
@ -37,7 +37,7 @@ let AclProxy = React.createClass({
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if(typeof this.props.aclObject[this.props.aclName] === 'undefined') {
|
if(typeof this.props.aclObject[this.props.aclName] === 'undefined') {
|
||||||
console.warn('The aclName you\'re filtering for was not present (undefined) in the aclObject.');
|
console.warn('The aclName you\'re filtering for was not present (or undefined) in the aclObject.');
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,9 @@ import Row from 'react-bootstrap/lib/Row';
|
|||||||
import LicenseActions from '../actions/license_actions';
|
import LicenseActions from '../actions/license_actions';
|
||||||
import LicenseStore from '../stores/license_store';
|
import LicenseStore from '../stores/license_store';
|
||||||
|
|
||||||
|
import WhitelabelActions from '../actions/whitelabel_actions';
|
||||||
|
import WhitelabelStore from '../stores/whitelabel_store';
|
||||||
|
|
||||||
import PieceListStore from '../stores/piece_list_store';
|
import PieceListStore from '../stores/piece_list_store';
|
||||||
import PieceListActions from '../actions/piece_list_actions';
|
import PieceListActions from '../actions/piece_list_actions';
|
||||||
|
|
||||||
@ -35,7 +38,6 @@ let RegisterPiece = React.createClass( {
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
headerMessage: React.PropTypes.string,
|
headerMessage: React.PropTypes.string,
|
||||||
submitMessage: React.PropTypes.string,
|
submitMessage: React.PropTypes.string,
|
||||||
canSpecifyEditions: React.PropTypes.bool,
|
|
||||||
children: React.PropTypes.oneOfType([
|
children: React.PropTypes.oneOfType([
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||||
React.PropTypes.element])
|
React.PropTypes.element])
|
||||||
@ -53,6 +55,7 @@ let RegisterPiece = React.createClass( {
|
|||||||
return mergeOptions(
|
return mergeOptions(
|
||||||
LicenseStore.getState(),
|
LicenseStore.getState(),
|
||||||
UserStore.getState(),
|
UserStore.getState(),
|
||||||
|
WhitelabelStore.getState(),
|
||||||
PieceListStore.getState(),
|
PieceListStore.getState(),
|
||||||
{
|
{
|
||||||
selectedLicense: 0,
|
selectedLicense: 0,
|
||||||
@ -62,15 +65,18 @@ let RegisterPiece = React.createClass( {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
LicenseActions.fetchLicense();
|
LicenseActions.fetchLicense();
|
||||||
|
WhitelabelActions.fetchWhitelabel();
|
||||||
LicenseStore.listen(this.onChange);
|
LicenseStore.listen(this.onChange);
|
||||||
PieceListStore.listen(this.onChange);
|
PieceListStore.listen(this.onChange);
|
||||||
UserStore.listen(this.onChange);
|
UserStore.listen(this.onChange);
|
||||||
|
WhitelabelStore.listen(this.onChange);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
LicenseStore.unlisten(this.onChange);
|
LicenseStore.unlisten(this.onChange);
|
||||||
PieceListStore.unlisten(this.onChange);
|
PieceListStore.unlisten(this.onChange);
|
||||||
UserStore.unlisten(this.onChange);
|
UserStore.unlisten(this.onChange);
|
||||||
|
WhitelabelStore.unlisten(this.onChange);
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(state) {
|
onChange(state) {
|
||||||
@ -136,7 +142,7 @@ let RegisterPiece = React.createClass( {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getSpecifyEditions() {
|
getSpecifyEditions() {
|
||||||
if (this.props.canSpecifyEditions) {
|
if (this.state.whitelabel.acl_editions) {
|
||||||
return (
|
return (
|
||||||
<PropertyCollapsible
|
<PropertyCollapsible
|
||||||
name="num_editions"
|
name="num_editions"
|
||||||
|
@ -14,8 +14,7 @@ let PrizeRegisterPiece = React.createClass({
|
|||||||
return (
|
return (
|
||||||
<RegisterPiece
|
<RegisterPiece
|
||||||
headerMessage={getLangText('Submit to the prize')}
|
headerMessage={getLangText('Submit to the prize')}
|
||||||
submitMessage={getLangText('Submit')}
|
submitMessage={getLangText('Submit')}>
|
||||||
canSpecifyEditions={false} >
|
|
||||||
<Property
|
<Property
|
||||||
name='artist_statement'
|
name='artist_statement'
|
||||||
label={getLangText('Artist statement')}
|
label={getLangText('Artist statement')}
|
||||||
|
@ -223,7 +223,11 @@ const languages = {
|
|||||||
'Sign up to the prize': 'Sign up to the prize',
|
'Sign up to the prize': 'Sign up to the prize',
|
||||||
'(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)',
|
'(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)',
|
||||||
'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers',
|
'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers',
|
||||||
'Log in with ascribe': 'Log in with ascribe'
|
'Log in with ascribe': 'Log in with ascribe',
|
||||||
|
'Submitted to prize': 'Submitted to prize',
|
||||||
|
'Welcome to ascribe': 'Welcome to ascribe',
|
||||||
|
'CREATE EDITIONS': 'CREATE EDITIONS',
|
||||||
|
'Remove Piece': 'Remove Piece'
|
||||||
},
|
},
|
||||||
'de': {
|
'de': {
|
||||||
'ID': 'ID',
|
'ID': 'ID',
|
||||||
@ -447,7 +451,11 @@ const languages = {
|
|||||||
'Sign up to the prize': 'Sign up to the prize',
|
'Sign up to the prize': 'Sign up to the prize',
|
||||||
'(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)',
|
'(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)',
|
||||||
'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers',
|
'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers',
|
||||||
'Log in with ascribe': 'Log in with ascribe'
|
'Log in with ascribe': 'Log in with ascribe',
|
||||||
|
'Submitted to prize': 'Submitted to prize',
|
||||||
|
'Welcome to ascribe': 'Welcome to ascribe',
|
||||||
|
'CREATE EDITIONS': 'CREATE EDITIONS',
|
||||||
|
'Remove Piece': 'Remove Piece'
|
||||||
},
|
},
|
||||||
'fr': {
|
'fr': {
|
||||||
'ID': 'ID',
|
'ID': 'ID',
|
||||||
@ -671,7 +679,11 @@ const languages = {
|
|||||||
'Sign up to the prize': 'Sign up to the prize',
|
'Sign up to the prize': 'Sign up to the prize',
|
||||||
'(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)',
|
'(e.g. andy@warhol.co.uk)': '(e.g. andy@warhol.co.uk)',
|
||||||
'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers',
|
'Use a combination of minimum 10 chars and numbers': 'Use a combination of minimum 10 chars and numbers',
|
||||||
'Log in with ascribe': 'Log in with ascribe'
|
'Log in with ascribe': 'Log in with ascribe',
|
||||||
|
'Submitted to prize': 'Submitted to prize',
|
||||||
|
'Welcome to ascribe': 'Welcome to ascribe',
|
||||||
|
'CREATE EDITIONS': 'CREATE EDITIONS',
|
||||||
|
'Remove Piece': 'Remove Piece'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user