Add submit input to Publish page

This commit is contained in:
Alex Liebowitz 2016-10-19 02:36:42 -04:00
parent eba4dbe146
commit 7cfbb60033

View file

@ -12,7 +12,11 @@ var publishNumberStyle = {
var PublishPage = React.createClass({ var PublishPage = React.createClass({
_requiredFields: ['name', 'bid', 'meta_title', 'meta_author', 'meta_license', 'meta_description'], _requiredFields: ['name', 'bid', 'meta_title', 'meta_author', 'meta_license', 'meta_description'],
handleSubmit: function() { handleSubmit: function(event) {
if (typeof event !== 'undefined') {
event.preventDefault();
}
this.setState({ this.setState({
submitting: true, submitting: true,
}); });
@ -456,6 +460,7 @@ var PublishPage = React.createClass({
<div className="card-series-submit"> <div className="card-series-submit">
<Link button="primary" label={!this.state.submitting ? 'Publish' : 'Publishing...'} onClick={this.handleSubmit} disabled={this.state.submitting} /> <Link button="primary" label={!this.state.submitting ? 'Publish' : 'Publishing...'} onClick={this.handleSubmit} disabled={this.state.submitting} />
<Link button="cancel" href="/" label="Cancel"/> <Link button="cancel" href="/" label="Cancel"/>
<input type='submit' className='hidden' />
</div> </div>
</form> </form>
</main> </main>