1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00

Fix a bug that locked submit button in disabled mode

This commit is contained in:
Tim Daubenschütz 2015-12-07 16:46:34 +01:00
parent 9c9c99c714
commit 343d6bfea2

View File

@ -85,6 +85,11 @@ let RegisterPieceForm = React.createClass({
if (digitalWorkFile &&
(digitalWorkFile.status === 'deleted' || digitalWorkFile.status === 'canceled')) {
this.refs.form.refs.thumbnail_file.reset();
// Manually we need to set the ready state for `thumbnailKeyReady` back
// to `true` as `ReactS3Fineuploader`'s `reset` method triggers
// `setIsUploadReady` with `false`
this.refs.submitButton.setReadyStateForKey('thumbnailKeyReady', true);
this.setState({ digitalWorkFile: null });
} else {
this.setState({ digitalWorkFile });