mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
cyland submit button and form WIP
cyland footers
This commit is contained in:
parent
fc82c866fb
commit
f77f1d1d5d
@ -4,7 +4,7 @@ import React from 'react';
|
|||||||
import Router from 'react-router';
|
import Router from 'react-router';
|
||||||
import Hero from './components/prize_hero';
|
import Hero from './components/prize_hero';
|
||||||
import Header from '../../header';
|
import Header from '../../header';
|
||||||
// import Footer from '../../footer';
|
import Footer from '../../footer';
|
||||||
import GlobalNotification from '../../global_notification';
|
import GlobalNotification from '../../global_notification';
|
||||||
|
|
||||||
let RouteHandler = Router.RouteHandler;
|
let RouteHandler = Router.RouteHandler;
|
||||||
@ -28,6 +28,7 @@ let PrizeApp = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
<GlobalNotification />
|
<GlobalNotification />
|
||||||
<div id="modal" className="container"></div>
|
<div id="modal" className="container"></div>
|
||||||
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,11 @@ import React from 'react';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
|
import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
|
||||||
import PieceSubmitToPrizeForm from '../../../../../ascribe_forms/form_submit_to_prize';
|
import CylandPieceSubmitForm from '../ascribe_forms/cyland_form_submit';
|
||||||
|
|
||||||
import { getLangText } from '../../../../../../utils/lang_utils';
|
import { getLangText } from '../../../../../../utils/lang_utils';
|
||||||
|
|
||||||
let SubmitToPrizeButton = React.createClass({
|
let CylandSubmitButton = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
className: React.PropTypes.string,
|
className: React.PropTypes.string,
|
||||||
handleSuccess: React.PropTypes.func,
|
handleSuccess: React.PropTypes.func,
|
||||||
@ -16,24 +16,12 @@ let SubmitToPrizeButton = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getSubmitButton() {
|
getSubmitButton() {
|
||||||
if (this.props.piece.prize) {
|
return (
|
||||||
return (
|
<button
|
||||||
<button
|
className={classNames('btn', 'btn-default', 'btn-xs', this.props.className)}>
|
||||||
disabled
|
{getLangText('Submit to Cyland')}
|
||||||
className="btn btn-default btn-xs pull-right">
|
</button>
|
||||||
{getLangText('Submitted to prize')} <span className="glyphicon glyphicon-ok"
|
);
|
||||||
aria-hidden="true"></span>
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return (
|
|
||||||
<button
|
|
||||||
className={classNames('btn', 'btn-default', 'btn-xs', this.props.className)}>
|
|
||||||
{getLangText('Submit to Cyland')}
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -41,8 +29,8 @@ let SubmitToPrizeButton = React.createClass({
|
|||||||
<ModalWrapper
|
<ModalWrapper
|
||||||
trigger={this.getSubmitButton()}
|
trigger={this.getSubmitButton()}
|
||||||
handleSuccess={this.props.handleSuccess}
|
handleSuccess={this.props.handleSuccess}
|
||||||
title={getLangText('Submit to prize')}>
|
title={getLangText('Submit to Cyland')}>
|
||||||
<PieceSubmitToPrizeForm
|
<CylandPieceSubmitForm
|
||||||
piece={this.props.piece}
|
piece={this.props.piece}
|
||||||
handleSuccess={this.props.handleSuccess}/>
|
handleSuccess={this.props.handleSuccess}/>
|
||||||
</ModalWrapper>
|
</ModalWrapper>
|
||||||
@ -51,4 +39,4 @@ let SubmitToPrizeButton = React.createClass({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default SubmitToPrizeButton;
|
export default CylandSubmitButton;
|
@ -0,0 +1,89 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import Form from '../../../../../ascribe_forms/form';
|
||||||
|
import Property from '../../../../../ascribe_forms/property';
|
||||||
|
import InputTextAreaToggable from '../../../../../ascribe_forms/input_textarea_toggable';
|
||||||
|
import InputCheckbox from '../../../../../ascribe_forms/input_checkbox';
|
||||||
|
|
||||||
|
import Alert from 'react-bootstrap/lib/Alert';
|
||||||
|
|
||||||
|
import AppConstants from '../../../../../../constants/application_constants';
|
||||||
|
import ApiUrls from '../../../../../../constants/api_urls';
|
||||||
|
|
||||||
|
import { getLangText } from '../../../../../../utils/lang_utils.js';
|
||||||
|
|
||||||
|
import requests from '../../../../../../utils/requests';
|
||||||
|
|
||||||
|
let CylandPieceSubmitForm = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
piece: React.PropTypes.object,
|
||||||
|
handleSuccess: React.PropTypes.func
|
||||||
|
},
|
||||||
|
|
||||||
|
render() {
|
||||||
|
//return (
|
||||||
|
// <Form
|
||||||
|
// ref='form'
|
||||||
|
// url={requests.prepareUrl(ApiUrls.piece_submit_to_prize, {piece_id: this.props.piece.id})}
|
||||||
|
// handleSuccess={this.props.handleSuccess}
|
||||||
|
// buttons={
|
||||||
|
// <div className="modal-footer">
|
||||||
|
// <p className="pull-right">
|
||||||
|
// <button
|
||||||
|
// className="btn btn-default btn-sm ascribe-margin-1px"
|
||||||
|
// type="submit">
|
||||||
|
// {getLangText('SUBMIT TO PRIZE')}
|
||||||
|
// </button>
|
||||||
|
// </p>
|
||||||
|
// </div>}
|
||||||
|
// spinner={
|
||||||
|
// <div className="modal-footer">
|
||||||
|
// <img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
||||||
|
// </div>}>
|
||||||
|
// <Property
|
||||||
|
// name='artist_statement'
|
||||||
|
// label={getLangText('Artist statement')}
|
||||||
|
// editable={true}>
|
||||||
|
// <InputTextAreaToggable
|
||||||
|
// rows={1}
|
||||||
|
// editable={true}
|
||||||
|
// placeholder={getLangText('Enter your statement')}
|
||||||
|
// required="required"/>
|
||||||
|
// </Property>
|
||||||
|
// <Property
|
||||||
|
// name='work_description'
|
||||||
|
// label={getLangText('Work description')}
|
||||||
|
// editable={true}>
|
||||||
|
// <InputTextAreaToggable
|
||||||
|
// rows={1}
|
||||||
|
// editable={true}
|
||||||
|
// placeholder={getLangText('Enter the description for your work')}
|
||||||
|
// required="required"/>
|
||||||
|
// </Property>
|
||||||
|
// <Property
|
||||||
|
// name="terms"
|
||||||
|
// className="ascribe-settings-property-collapsible-toggle"
|
||||||
|
// style={{paddingBottom: 0}}>
|
||||||
|
// <InputCheckbox>
|
||||||
|
// <span>
|
||||||
|
// {' ' + getLangText('I agree to the Terms of Service the art price') + ' '}
|
||||||
|
// (<a href="https://s3-us-west-2.amazonaws.com/ascribe0/whitelabel/sluice/terms.pdf" target="_blank" style={{fontSize: '0.9em', color: 'rgba(0,0,0,0.7)'}}>
|
||||||
|
// {getLangText('read')}
|
||||||
|
// </a>)
|
||||||
|
// </span>
|
||||||
|
// </InputCheckbox>
|
||||||
|
// </Property>
|
||||||
|
// <Alert bsStyle='warning'>
|
||||||
|
// <p>{getLangText('Are you sure you want to submit to the prize?')}</p>
|
||||||
|
// <p>{getLangText('This is an irrevocable action%s', '.')}</p>
|
||||||
|
// </Alert>
|
||||||
|
// </Form>
|
||||||
|
//);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
export default CylandPieceSubmitForm;
|
@ -3,6 +3,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Router from 'react-router';
|
import Router from 'react-router';
|
||||||
import Header from '../../header';
|
import Header from '../../header';
|
||||||
|
import Footer from '../../footer';
|
||||||
|
|
||||||
import GlobalNotification from '../../global_notification';
|
import GlobalNotification from '../../global_notification';
|
||||||
|
|
||||||
let RouteHandler = Router.RouteHandler;
|
let RouteHandler = Router.RouteHandler;
|
||||||
@ -15,6 +17,7 @@ let WalletApp = React.createClass({
|
|||||||
<RouteHandler />
|
<RouteHandler />
|
||||||
<GlobalNotification />
|
<GlobalNotification />
|
||||||
<div id="modal" className="container"></div>
|
<div id="modal" className="container"></div>
|
||||||
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user