From 343d6bfea2972ae2f75e219056be1ec80b3c588a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 7 Dec 2015 16:46:34 +0100 Subject: [PATCH] Fix a bug that locked submit button in disabled mode --- js/components/ascribe_forms/form_register_piece.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js index 5a2c1e59..7288aa63 100644 --- a/js/components/ascribe_forms/form_register_piece.js +++ b/js/components/ascribe_forms/form_register_piece.js @@ -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 });