From 2dd3af15cf96c89ccf38e8b8a56ab8595cf69fb8 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Wed, 25 Sep 2024 09:16:46 -0700 Subject: [PATCH] TN-3318 remove patient list export button in patient list for researchers --- portal/templates/admin/patients_by_org.html | 3 ++- portal/templates/admin/patients_substudy.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/portal/templates/admin/patients_by_org.html b/portal/templates/admin/patients_by_org.html index 376c83318a..d144eb71df 100644 --- a/portal/templates/admin/patients_by_org.html +++ b/portal/templates/admin/patients_by_org.html @@ -32,6 +32,7 @@

{{_("Patient List")}}

{{deletedUsersFilter()}} {% endif %} + {% set isResearcher = user.has_role(ROLE.RESEARCHER.value) and not(user.has_role(ROLE.ADMIN.value)) %} {{_("Patient List")}} data-unique-id="id" data-id-field="id" data-filter-control="true" - data-show-export="true" + {%- if not isResearcher -%} data-show-export="true" {%- endif -%} data-export-data-type="all" > {{testUsersCheckbox(postUrl=url_for('patients.patients_root'))}} diff --git a/portal/templates/admin/patients_substudy.html b/portal/templates/admin/patients_substudy.html index c4cfe7e8c6..736bd5d7d9 100644 --- a/portal/templates/admin/patients_substudy.html +++ b/portal/templates/admin/patients_substudy.html @@ -33,6 +33,7 @@

{{list_title}}

+ {% set isResearcher = user.has_role(ROLE.RESEARCHER.value) and not(user.has_role(ROLE.ADMIN.value)) %}
{{list_title}} data-unique-id="id" data-id-field="id" data-filter-control="true" - data-show-export="true" + {%- if not isResearcher -%} data-show-export="true" {%- endif -%} data-export-data-type="all" > {{testUsersCheckbox(postUrl=url_for('patients.patients_substudy'))}}