Last active
December 5, 2015 03:30
-
-
Save czbaker/2101526219eea5330553 to your computer and use it in GitHub Desktop.
Issue with form submission...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App = React.createClass({ | |
//mixins: [ReactMeteorData], | |
// Initial State declared here. | |
getInitialState() { | |
return { | |
deckState: null | |
}; | |
}, | |
// TODO: State Manipulation | |
render() { | |
return ( | |
<html> | |
<head> | |
<title>{this.props.title ? `Karuto - ${this.props.title}` : "Karuto"}</title> | |
</head> | |
<body> | |
{this.props.layout} | |
</body> | |
</html> | |
); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MainLayout = React.createClass({ | |
//mixins: [ReactMeteorData], | |
render() { | |
return ( | |
<div> | |
<Navigation /> | |
<div className="ui main container"> | |
{this.props.content} | |
</div> | |
</div> | |
); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProxyForm = React.createClass({ | |
// mixins: [ReactMeteorData], | |
handleSubmit(event) { | |
event.preventDefault(); | |
console.log('test'); | |
}, | |
render() { | |
return ( | |
<form className="proxy-form ui form" onSubmit={this.handleSubmit}> | |
<div className="field"> | |
<textarea rows="20" ref="proxy-cards"></textarea> | |
</div> | |
<button className="ui button" type="submit">Submit</button> | |
</form> | |
); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProxyPage = React.createClass({ | |
// mixins: [ReactMeteorData], | |
render() { | |
return ( | |
<div className="pusher"> | |
<div className="ui main container"> | |
<div className="ui two column centered grid"> | |
<div className="ui twelve wide column"> | |
<div className="ui message"> | |
<p> | |
Use this form to enter the list of cards you need to proxy. | |
Make sure to only put one card on each line, and use the following | |
format when entering cards: | |
</p> | |
<p> | |
<strong>Mystical Space Typhoon</strong> (single card)<br /> | |
<strong>2 Mirror Force</strong> (multiple copies)<br /> | |
<strong>3x Dark Hole</strong> (multiple copies) | |
</p> | |
<p> | |
Press 'E' while on the next page to pop-out an editor if you need to make | |
adjustments. | |
</p> | |
<p> | |
<strong>Currently, only TCG cards are supported. This is something that | |
will need to be fixed in the future, ASAP.</strong> | |
</p> | |
</div> | |
<ProxyForm /> | |
</div> | |
</div> | |
</div> | |
</div> | |
); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FlowRouter.route('/proxies', { | |
name: 'proxies', | |
action() { | |
const content = <ProxyPage />; | |
ReactLayout.render(App, { | |
title: 'Proxies', | |
layout: <MainLayout content={content} /> | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment