diff options
author | Frederick Muriuki Muriithi | 2023-04-21 04:39:29 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-04-21 04:39:29 +0300 |
commit | 85e9e69e265d12235acdf8992e1c4611961d65b0 (patch) | |
tree | 5bc5846ff3a8896c7d13cb4e5b6ade0be45fb7c9 /wqflask | |
parent | 7905b97e839e0f9c4cb15740b9293963b64118d6 (diff) | |
download | genenetwork2-85e9e69e265d12235acdf8992e1c4611961d65b0.tar.gz |
oauth2: Update to enable linking of phenotypes.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/oauth2/resources.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/templates/oauth2/group_join_or_create.html | 1 | ||||
-rw-r--r-- | wqflask/wqflask/templates/oauth2/view-resource.html | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/wqflask/wqflask/oauth2/resources.py b/wqflask/wqflask/oauth2/resources.py index c4f3744b..c01889c3 100644 --- a/wqflask/wqflask/oauth2/resources.py +++ b/wqflask/wqflask/oauth2/resources.py @@ -126,7 +126,7 @@ def link_data_to_resource(): form = request.form try: assert "resource_id" in form, "Resource ID not provided." - assert "dataset_id" in form, "Dataset ID not provided." + assert "data_link_id" in form, "Data Link ID not provided." assert "dataset_type" in form, "Dataset type not specified" assert form["dataset_type"].lower() in ( "mrna", "genotype", "phenotype"), "Invalid dataset type provided." @@ -157,7 +157,7 @@ def unlink_data_from_resource(): form = request.form try: assert "resource_id" in form, "Resource ID not provided." - assert "dataset_id" in form, "Dataset ID not provided." + assert "data_link_id" in form, "Data Link ID not provided." resource_id = form["resource_id"] def __error__(error): diff --git a/wqflask/wqflask/templates/oauth2/group_join_or_create.html b/wqflask/wqflask/templates/oauth2/group_join_or_create.html index 6f74d576..0209cd15 100644 --- a/wqflask/wqflask/templates/oauth2/group_join_or_create.html +++ b/wqflask/wqflask/templates/oauth2/group_join_or_create.html @@ -1,4 +1,5 @@ {%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} {%block title%}Join or Create Group{%endblock%} {%block css%} diff --git a/wqflask/wqflask/templates/oauth2/view-resource.html b/wqflask/wqflask/templates/oauth2/view-resource.html index 510d7e67..8a5b360c 100644 --- a/wqflask/wqflask/templates/oauth2/view-resource.html +++ b/wqflask/wqflask/templates/oauth2/view-resource.html @@ -126,8 +126,8 @@ method="POST"> <input type="hidden" name="resource_id" value="{{resource.resource_id}}" /> - <input type="hidden" name="dataset_id" - value="{{data_item.dataset_or_trait_id}}" /> + <input type="hidden" name="data_link_id" + value="{{data_item.data_link_id}}" /> <input type="submit" value="Unlink" class="btn btn-danger" /> </form> </td> @@ -199,10 +199,10 @@ action="{{url_for('oauth2.resource.link_data_to_resource')}}"> <input type="hidden" name="resource_id" value="{{resource.resource_id}}" /> - <input type="hidden" name="dataset_id" - value="{{data_item.dataset_or_trait_id}}" /> + <input type="hidden" name="data_link_id" + value="{{data_item.data_link_id}}" /> <input type="hidden" name="dataset_type" - value="{{data_item.dataset_type}}" /> + value="{{resource.resource_category.resource_category_key | lower}}" /> <input type="submit" value="Link" class="btn btn-info" {%if resource.resource_category.resource_category_description == "mRNA Dataset" and resource.resource_data | count != 0%} disabled="disabled" |