diff options
| author | Frederick Muriuki Muriithi | 2026-01-23 17:36:10 -0600 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-01-23 17:36:10 -0600 |
| commit | 8119650b2fc88158d91fec70587b971922199fe3 (patch) | |
| tree | b5dcb4576a12122949dbce34be13f452232e18f0 /uploader/phenotypes | |
| parent | 89622a79f0881572d7cbf1fbc8fb0929b2ccb08b (diff) | |
| download | gn-uploader-8119650b2fc88158d91fec70587b971922199fe3.tar.gz | |
Add initial placeholder UI to confirm deletion.
Diffstat (limited to 'uploader/phenotypes')
| -rw-r--r-- | uploader/phenotypes/views.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index aaccf18..f7d8e55 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -1173,7 +1173,15 @@ def delete_phenotypes(# pylint: disable=[unused-argument] **kwargs ): """Delete the specified phenotype data.""" - if request.method == "GET": - return "Would confirm deletion." + if request.form.get("confirm", "").lower() == "confirm": + return f"Would delete! {request.form}" - return "Would delete!" + with database_connection(app.config["SQL_URI"]) as conn: + xref_ids = tuple( + int(item) for item in set(request.form.getlist("xref_ids"))) + return render_template( + "phenotypes/confirm-delete-phenotypes.html", + species=species, + population=population, + dataset=dataset, + phenotypes=xref_ids) |
