Skip to content

Instantly share code, notes, and snippets.

@czbaker
Last active December 5, 2015 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czbaker/2101526219eea5330553 to your computer and use it in GitHub Desktop.
Save czbaker/2101526219eea5330553 to your computer and use it in GitHub Desktop.
Issue with form submission...
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>
);
}
});
MainLayout = React.createClass({
//mixins: [ReactMeteorData],
render() {
return (
<div>
<Navigation />
<div className="ui main container">
{this.props.content}
</div>
</div>
);
}
});
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>
);
}
});
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>
);
}
});
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