diff options
| author | Frederick Muriuki Muriithi | 2026-04-09 09:06:57 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-04-09 09:06:57 -0500 |
| commit | 3fdbad1fe6b83229bb0641377130f1364624d059 (patch) | |
| tree | 755bdecd6f7d937049fdeeb65c224e44d8a900b1 /uploader | |
| parent | 7c241531b4dae994173de14691c299ee1f81106c (diff) | |
| download | gn-uploader-3fdbad1fe6b83229bb0641377130f1364624d059.tar.gz | |
Prompt user for a name for the resource object.
Diffstat (limited to 'uploader')
| -rw-r--r-- | uploader/phenotypes/views.py | 10 | ||||
| -rw-r--r-- | uploader/templates/phenotypes/review-job-data.html | 37 |
2 files changed, 43 insertions, 4 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index 23bc682..9cacf61 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -662,6 +662,8 @@ def review_job_data( conn, int(_job_metadata["publicationid"])) if _job_metadata.get("publicationid") else None), + user=session.user_details(), + timestamp=datetime.datetime.now().isoformat(), activelink="add-phenotypes") @@ -741,9 +743,15 @@ def load_data_to_database( "publication_id": _meta["publicationid"], "authserver": oauth2client.authserver_uri(), "token": token["access_token"], + "dataname": request.form["data_name"].strip(), "success_handler": ( "uploader.phenotypes.views" - ".load_phenotypes_success_handler") + ".load_phenotypes_success_handler"), + **{ + key: request.form[key] + for key in ("data_description",) + if key in request.form.keys() + } }, external_id=session.logged_in_user_id()) ).then( diff --git a/uploader/templates/phenotypes/review-job-data.html b/uploader/templates/phenotypes/review-job-data.html index c8355b2..0e8f119 100644 --- a/uploader/templates/phenotypes/review-job-data.html +++ b/uploader/templates/phenotypes/review-job-data.html @@ -70,6 +70,9 @@ {%endif%} {%endfor%} </ul> +</div> + +<div class="row"> <form id="frm-review-phenotype-data" method="POST" @@ -78,10 +81,38 @@ population_id=population.Id, dataset_id=dataset.Id)}}"> <input type="hidden" name="data-qc-job-id" value="{{job.jobid}}" /> - <input type="submit" - value="continue" - class="btn btn-primary" /> + <div class="form-group"> + <label for="txt-data-name">data name</label> + <input type="text" + id="txt-data-name" + class="form-control" + name="data_name" + title="A short, descriptive name for this data." + placeholder="{{user.email}} - {{dataset.Name}} - {{timestamp}}" + value="{{user.email}} - {{dataset.Name}} - {{timestamp}}" + required="required"> + <span class="form-text text-muted"> + This is a short, descriptive name for the data. It is useful to humans, + enabling them identify what traits each data "resource" wraps around. + </span> + </div> + + {%if view_under_construction%} + <div class="form-group"> + <label for="txt-data-description">data description</label> + <textarea id="txt-data-description" + class="form-control" + name="data_description" + title="A longer description for this data." + rows="5"></textarea> + <span class="form-text text-muted"> + </span> + </div> + {%endif%} + + <button type="submit" class="btn btn-primary">continue</button> </form> + </div> {%else%} <div class="row"> |
