From 9efa1024879c71ed3407ccb10a35ea52b1b4312f Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Wed, 18 Nov 2020 02:34:52 -0500 Subject: [PATCH] Max Attempts improvements in challenge.html (#1725) * Fixed issue where the current attempt count would have a typo * Fixed issue where the max attempts for a challenge would not show if it was set to 1 * Works on #1655 --- CTFd/themes/core/templates/challenge.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CTFd/themes/core/templates/challenge.html b/CTFd/themes/core/templates/challenge.html index dd8de142..db5382e6 100644 --- a/CTFd/themes/core/templates/challenge.html +++ b/CTFd/themes/core/templates/challenge.html @@ -83,11 +83,11 @@ {% endfor %} - {% if max_attempts > 1 %} + {% if max_attempts > 0 %}

- {{ attempts }}/{{ max_attempts }} attempt{{ attempts|pluralize(attempts) }} + {{ attempts }}/{{ max_attempts }} attempt{{ max_attempts|pluralize }}