mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +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 {
|
||||
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;
|
||||
}
|
||||
|
@ -9,6 +9,9 @@ import Row from 'react-bootstrap/lib/Row';
|
||||
import LicenseActions from '../actions/license_actions';
|
||||
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 PieceListActions from '../actions/piece_list_actions';
|
||||
|
||||
@ -35,7 +38,6 @@ let RegisterPiece = React.createClass( {
|
||||
propTypes: {
|
||||
headerMessage: React.PropTypes.string,
|
||||
submitMessage: React.PropTypes.string,
|
||||
canSpecifyEditions: React.PropTypes.bool,
|
||||
children: React.PropTypes.oneOfType([
|
||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||
React.PropTypes.element])
|
||||
@ -53,6 +55,7 @@ let RegisterPiece = React.createClass( {
|
||||
return mergeOptions(
|
||||
LicenseStore.getState(),
|
||||
UserStore.getState(),
|
||||
WhitelabelStore.getState(),
|
||||
PieceListStore.getState(),
|
||||
{
|
||||
selectedLicense: 0,
|
||||
@ -62,15 +65,18 @@ let RegisterPiece = React.createClass( {
|
||||
|
||||
componentDidMount() {
|
||||
LicenseActions.fetchLicense();
|
||||
WhitelabelActions.fetchWhitelabel();
|
||||
LicenseStore.listen(this.onChange);
|
||||
PieceListStore.listen(this.onChange);
|
||||
UserStore.listen(this.onChange);
|
||||
WhitelabelStore.listen(this.onChange);
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
LicenseStore.unlisten(this.onChange);
|
||||
PieceListStore.unlisten(this.onChange);
|
||||
UserStore.unlisten(this.onChange);
|
||||
WhitelabelStore.unlisten(this.onChange);
|
||||
},
|
||||
|
||||
onChange(state) {
|
||||
@ -136,7 +142,7 @@ let RegisterPiece = React.createClass( {
|
||||
},
|
||||
|
||||
getSpecifyEditions() {
|
||||
if (this.props.canSpecifyEditions) {
|
||||
if (this.state.whitelabel.acl_editions) {
|
||||
return (
|
||||
<PropertyCollapsible
|
||||
name="num_editions"
|
||||
|
@ -14,8 +14,7 @@ let PrizeRegisterPiece = React.createClass({
|
||||
return (
|
||||
<RegisterPiece
|
||||
headerMessage={getLangText('Submit to the prize')}
|
||||
submitMessage={getLangText('Submit')}
|
||||
canSpecifyEditions={false} >
|
||||
submitMessage={getLangText('Submit')}>
|
||||
<Property
|
||||
name='artist_statement'
|
||||
label={getLangText('Artist statement')}
|
||||
|
@ -223,7 +223,11 @@ const languages = {
|
||||
'Sign up to the prize': 'Sign up to the prize',
|
||||
'(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',
|
||||
'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': {
|
||||
'ID': 'ID',
|
||||
@ -447,7 +451,11 @@ const languages = {
|
||||
'Sign up to the prize': 'Sign up to the prize',
|
||||
'(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',
|
||||
'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': {
|
||||
'ID': 'ID',
|
||||
@ -671,7 +679,11 @@ const languages = {
|
||||
'Sign up to the prize': 'Sign up to the prize',
|
||||
'(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',
|
||||
'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