From 2b3f9f5342cbd89a02c6998a2115e471f5b72ec3 Mon Sep 17 00:00:00 2001 From: Birdie Date: Wed, 9 Jun 2021 08:24:34 -0400 Subject: [PATCH 1/4] Get this cancel button to close the Uploads modal --- src/src/App.js | 12 ++++++------ src/src/components/uploads/createUploads.jsx | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/src/App.js b/src/src/App.js index 0dc595f2..a7cca4a0 100644 --- a/src/src/App.js +++ b/src/src/App.js @@ -182,13 +182,13 @@ handleMenuSelection = (event) => { }; handleClose = () => { - console.log("handleClose"); + console.log("App.js handleClose"); this.setState({ + creatingNewUpload: false, anchorEl: null, show_menu_popup: false, open_edit_dialog: false, - creatingNewEntity: false, - creatingNewUpload: false + creatingNewEntity: false }) }; @@ -264,7 +264,7 @@ handleMenuSelection = (event) => { */} { Dataset Data Upload - @@ -506,8 +505,9 @@ handleMenuSelection = (event) => { diff --git a/src/src/components/uploads/createUploads.jsx b/src/src/components/uploads/createUploads.jsx index 17ddabf2..0abd38ac 100644 --- a/src/src/components/uploads/createUploads.jsx +++ b/src/src/components/uploads/createUploads.jsx @@ -34,6 +34,7 @@ class CreateUploads extends Component { var tgl = this.getUserGroups(); console.log(tgl); console.debug(this.state); + console.debug(this.props); } @@ -110,7 +111,14 @@ class CreateUploads extends Component { cancelEdit = () => { - this.setState({ creatingNewSubmission: false, editingSubmission: null }); + console.debug("form js cancelEdit!!"); + this.setState({ + creatingNewSubmission: false, + editingSubmission: null , + processingUpload:false, + submitting: false, + creatingNewUpload:false + }); }; @@ -226,19 +234,19 @@ class CreateUploads extends Component { className="inline-icon" icon={faSpinner} spin - /> + /> )} {!this.state.submitting && "Create"} - + ); } From 8aaff4c472e1e190999540d02dd018764d9629b0 Mon Sep 17 00:00:00 2001 From: Birdie Date: Wed, 9 Jun 2021 08:30:12 -0400 Subject: [PATCH 2/4] DOnt close uploads modal on backdrop click --- src/src/App.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/src/App.js b/src/src/App.js index a7cca4a0..393369ba 100644 --- a/src/src/App.js +++ b/src/src/App.js @@ -502,7 +502,18 @@ handleMenuSelection = (event) => { {this.state.isAuthenticated && this.state.creatingNewUpload && (
- + { + if (reason !== 'backdropClick') { + this.handleClose() + } + }} + > Date: Wed, 9 Jun 2021 08:52:31 -0400 Subject: [PATCH 3/4] Updates tooltip & label text within the Upload Creation form --- src/src/components/uploads/createUploads.jsx | 31 ++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/src/components/uploads/createUploads.jsx b/src/src/components/uploads/createUploads.jsx index 0abd38ac..cb706d21 100644 --- a/src/src/components/uploads/createUploads.jsx +++ b/src/src/components/uploads/createUploads.jsx @@ -198,6 +198,7 @@ class CreateUploads extends Component { } renderGroupSelect(){ + //Select the data provider group that this data belongs to return (
-

Description Tips

+

A full description of this Data Upload which will be used internally by the Consortium (not displayed publicly) for the purposes of searching for the Data Upload.

@@ -338,9 +339,29 @@ class CreateUploads extends Component { />
+
+
+ + + + +

Choose the Data Provider group which the data included in this Data Upload will be associated with/is being uploaded by.

+
+
{this.renderGroupSelect()} - {this.state.submit_error && (
From b51914355400e6719cc0f96b123f4eebf9b6ef3f Mon Sep 17 00:00:00 2001 From: Birdie Date: Wed, 9 Jun 2021 09:55:38 -0400 Subject: [PATCH 4/4] Adds informative text to the right of the Uploads creation Modal --- src/src/components/uploads/createUploads.jsx | 245 ++++++++++--------- 1 file changed, 128 insertions(+), 117 deletions(-) diff --git a/src/src/components/uploads/createUploads.jsx b/src/src/components/uploads/createUploads.jsx index cb706d21..6eab981c 100644 --- a/src/src/components/uploads/createUploads.jsx +++ b/src/src/components/uploads/createUploads.jsx @@ -22,9 +22,9 @@ class CreateUploads extends Component { errorMessage:" ", showNewUpload:true, formErrors: { - title: "", - description: "" - }, + title: "", + description: "" + }, }; } @@ -146,7 +146,7 @@ class CreateUploads extends Component { renderLoadingSpinner() { return ( -
+

Generating your new folder.

Please do not refresh or leave this page
@@ -255,125 +255,136 @@ class CreateUploads extends Component { render() { return ( - - {(this.state.processingUpload) && ( - this.renderLoadingSpinner() - )} - {(!this.state.processingUpload) && ( +
+
+
+

+ Create a new Data Upload +

+
+
+ +
+
-
-
-
-

- Create a new Data Upload -

-
-
+ {(this.state.processingUpload) && ( + this.renderLoadingSpinner() + )} + {(!this.state.processingUpload) && ( +
+ -
- - - - -

A name for this upload. This will be used internally by Consortium members for the purposes of finding this Data Upload

-
-
- -
- -
- - - - -

A full description of this Data Upload which will be used internally by the Consortium (not displayed publicly) for the purposes of searching for the Data Upload.

-
-
- -
-