From e819659d9710965b7438f2eccaa54b40cb621b8a Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Thu, 20 Aug 2020 15:55:57 -0400 Subject: [PATCH] Add team fields --- CTFd/themes/admin/templates/teams/team.html | 6 ++++++ CTFd/themes/core/templates/teams/private.html | 5 +++++ CTFd/themes/core/templates/teams/public.html | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/CTFd/themes/admin/templates/teams/team.html b/CTFd/themes/admin/templates/teams/team.html index 3c77a747..158b9c78 100644 --- a/CTFd/themes/admin/templates/teams/team.html +++ b/CTFd/themes/admin/templates/teams/team.html @@ -137,6 +137,12 @@ {% endif %} + {% for field in team.get_fields(admin=true) %} +

+ {{ field.name }}: {{ field.value }} +

+ {% endfor %} +

{{ members | length }} members

{% if place %} diff --git a/CTFd/themes/core/templates/teams/private.html b/CTFd/themes/core/templates/teams/private.html index 63102f84..585af365 100644 --- a/CTFd/themes/core/templates/teams/private.html +++ b/CTFd/themes/core/templates/teams/private.html @@ -126,6 +126,11 @@

{% endif %} + {% for field in team.fields %} +

+ {{ field.name }}: {{ field.value }} +

+ {% endfor %}

{# This intentionally hides the team's place when scores are hidden because this can be their internal profile and we don't want to leak their place in the CTF. #} diff --git a/CTFd/themes/core/templates/teams/public.html b/CTFd/themes/core/templates/teams/public.html index ee72cde9..0b125bf6 100644 --- a/CTFd/themes/core/templates/teams/public.html +++ b/CTFd/themes/core/templates/teams/public.html @@ -25,6 +25,11 @@

{% endif %} + {% for field in team.fields %} +

+ {{ field.name }}: {{ field.value }} +

+ {% endfor %}

{# This intentionally hides the team's place when scores are hidden because this can be their internal profile and we don't want to leak their place in the CTF. #}