mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
Fix minor bugs for simple_prize app
This commit is contained in:
parent
f5a5e045a6
commit
b78bc66fe9
12
c
Normal file
12
c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
commit 22fd8656e9e93a5d8d2a412dbed33fce0db57af8
|
||||||
|
Author: Tim Daubenschütz <tim@ascribe.io>
|
||||||
|
Date: Fri Nov 6 12:09:31 2015 +0100
|
||||||
|
|
||||||
|
Finalize boilerplate for portfolioreview subdomain
|
||||||
|
|
||||||
|
commit d1dd33c094194bb6271e2ae11817837b4c39caa5
|
||||||
|
Author: Tim Daubenschütz <tim@ascribe.io>
|
||||||
|
Date: Thu Nov 5 16:45:12 2015 +0100
|
||||||
|
|
||||||
|
Move and rename sluice prize app to 'simple_prize'
|
||||||
|
|
@ -40,12 +40,6 @@ let RegisterPiece = React.createClass( {
|
|||||||
|
|
||||||
mixins: [History],
|
mixins: [History],
|
||||||
|
|
||||||
getDefaultProps() {
|
|
||||||
return {
|
|
||||||
canSpecifyEditions: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
getInitialState(){
|
getInitialState(){
|
||||||
return mergeOptions(
|
return mergeOptions(
|
||||||
UserStore.getState(),
|
UserStore.getState(),
|
||||||
|
@ -67,16 +67,16 @@ const ROUTES = {
|
|||||||
headerTitle='+ NEW WORK'/>
|
headerTitle='+ NEW WORK'/>
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(SPLoginContainer)} />
|
component={AuthProxyHandler({to: '/register_piece', when: 'loggedIn'})(SPLoginContainer)} />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={AuthProxyHandler({to: '/', when: 'loggedOut'})(LogoutContainer)}/>
|
component={AuthProxyHandler({to: '/', when: 'loggedOut'})(LogoutContainer)}/>
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(SPSignupContainer)} />
|
component={AuthProxyHandler({to: '/register_piece', when: 'loggedIn'})(SPSignupContainer)} />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(PasswordResetContainer)} />
|
component={AuthProxyHandler({to: '/register_piece', when: 'loggedIn'})(PasswordResetContainer)} />
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
<Route path='*' component={ErrorNotFoundPage} />
|
||||||
</Route>
|
</Route>
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { alt } from '../../../../../alt';
|
import { alt } from '../../../../../alt';
|
||||||
import Q from 'q';
|
|
||||||
|
|
||||||
import PrizeFetcher from '../fetchers/prize_fetcher';
|
import PrizeFetcher from '../fetchers/prize_fetcher';
|
||||||
|
|
||||||
@ -13,19 +12,15 @@ class PrizeActions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetchPrize() {
|
fetchPrize() {
|
||||||
return Q.Promise((resolve, reject) => {
|
|
||||||
PrizeFetcher
|
PrizeFetcher
|
||||||
.fetch()
|
.fetch()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.actions.updatePrize({
|
this.actions.updatePrize({
|
||||||
prize: res.prize
|
prize: res.prize
|
||||||
});
|
});
|
||||||
resolve(res);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.logGlobal(err);
|
console.logGlobal(err);
|
||||||
reject(err);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,10 @@ import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
|||||||
|
|
||||||
|
|
||||||
let PrizeRegisterPiece = React.createClass({
|
let PrizeRegisterPiece = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
location: React.PropTypes.object
|
||||||
|
},
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
return PrizeStore.getState();
|
return PrizeStore.getState();
|
||||||
},
|
},
|
||||||
@ -33,6 +37,8 @@ let PrizeRegisterPiece = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { location } = this.props;
|
||||||
|
|
||||||
setDocumentTitle(getLangText('Submit to the prize'));
|
setDocumentTitle(getLangText('Submit to the prize'));
|
||||||
|
|
||||||
if(this.state.prize && this.state.prize.active){
|
if(this.state.prize && this.state.prize.active){
|
||||||
@ -40,7 +46,8 @@ let PrizeRegisterPiece = React.createClass({
|
|||||||
<RegisterPiece
|
<RegisterPiece
|
||||||
enableLocalHashing={false}
|
enableLocalHashing={false}
|
||||||
headerMessage={getLangText('Submit to the prize')}
|
headerMessage={getLangText('Submit to the prize')}
|
||||||
submitMessage={getLangText('Submit')}>
|
submitMessage={getLangText('Submit')}
|
||||||
|
location={location}>
|
||||||
<Property
|
<Property
|
||||||
name='artist_statement'
|
name='artist_statement'
|
||||||
label={getLangText('Artist statement')}
|
label={getLangText('Artist statement')}
|
||||||
@ -74,7 +81,8 @@ let PrizeRegisterPiece = React.createClass({
|
|||||||
</span>
|
</span>
|
||||||
</InputCheckbox>
|
</InputCheckbox>
|
||||||
</Property>
|
</Property>
|
||||||
</RegisterPiece>);
|
</RegisterPiece>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user