diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index 875fe512..f2b006a9 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -13,6 +13,9 @@ import CreateEditionsForm from '../ascribe_forms/create_editions_form'; import PieceListActions from '../../actions/piece_list_actions'; import PieceListStore from '../../stores/piece_list_store'; +import WhitelabelStore from '../../stores/whitelabel_store'; +import WhitelabelActions from '../../actions/whitelabel_actions'; + import EditionListActions from '../../actions/edition_list_actions'; import GlobalNotificationModel from '../../models/global_notification_model'; @@ -40,16 +43,19 @@ let AccordionListItem = React.createClass({ { showCreateEditionsDialog: false }, - PieceListStore.getState() + PieceListStore.getState(), + WhitelabelStore.getState() ); }, componentDidMount() { PieceListStore.listen(this.onChange); + WhitelabelStore.listen(this.onChange); }, componentWillUnmount() { PieceListStore.unlisten(this.onChange); + WhitelabelStore.unlisten(this.onChange); }, onChange(state) { @@ -111,6 +117,17 @@ let AccordionListItem = React.createClass({ } }, + getLicences() { + // convert this to acl_view_licences later + if(this.state.whitelabel.name === 'Creative Commons France') { + return ( + + {getLangText('%s license', this.props.content.license_type.code)} + + ); + } + }, + render() { let linkData; @@ -173,6 +190,7 @@ let AccordionListItem = React.createClass({ {getLangText('Submitted to prize')} + {this.getLicences()} diff --git a/js/components/ascribe_forms/form_signup.js b/js/components/ascribe_forms/form_signup.js index e4d50ec9..28afe008 100644 --- a/js/components/ascribe_forms/form_signup.js +++ b/js/components/ascribe_forms/form_signup.js @@ -58,12 +58,9 @@ let SignupForm = React.createClass({ }, handleSuccess(response){ - - let notificationText = getLangText('Sign up successful'); - let notification = new GlobalNotificationModel(notificationText, 'success', 50000); + let notification = new GlobalNotificationModel(getLangText('Sign up successful'), 'success', 50000); GlobalNotificationActions.appendGlobalNotification(notification); - this.props.handleSuccess(getLangText('We sent an email to your address') + ' ' + response.user.email + - ', ' + getLangText('please confirm') + '.'); + this.props.handleSuccess(getLangText('We sent an email to your address') + ' ' + response.user.email + ', ' + getLangText('please confirm') + '.'); }, getFormData(){ diff --git a/js/components/signup_container.js b/js/components/signup_container.js index e7d4e69f..46813b59 100644 --- a/js/components/signup_container.js +++ b/js/components/signup_container.js @@ -2,9 +2,6 @@ import React from 'react'; import SignupForm from './ascribe_forms/form_signup'; -import Property from './ascribe_forms/property'; - -import { getLangText } from '../utils/lang_utils'; let SignupContainer = React.createClass({ diff --git a/js/components/whitelabel/prize/components/signup_container.js b/js/components/whitelabel/prize/components/signup_container.js index 4950dac7..7f3e769a 100644 --- a/js/components/whitelabel/prize/components/signup_container.js +++ b/js/components/whitelabel/prize/components/signup_container.js @@ -28,15 +28,16 @@ let SignupContainer = React.createClass({ ); + } else { + return ( +