From 2f252f5240775562c19f9641df35e172d663e052 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Thu, 28 Feb 2019 20:04:21 -0800 Subject: [PATCH] Fix for overflowing content preventing edit and deletion in admin panel (#891) * Closes #876 * Fixes overflowing admin panel content by adding the `.text-break` CSS class. * This is .text-break cloned from Bootstrap 4.3 with a fix for browsers not supporting break-word. It will be removed from the main CTFd classes when Bootstrap is upgraded internally. --- CTFd/themes/admin/static/css/base.css | 7 +++++++ CTFd/themes/admin/templates/modals/challenges/flags.html | 2 +- CTFd/themes/admin/templates/modals/challenges/hints.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CTFd/themes/admin/static/css/base.css b/CTFd/themes/admin/static/css/base.css index 3e3df21..2de92f9 100644 --- a/CTFd/themes/admin/static/css/base.css +++ b/CTFd/themes/admin/static/css/base.css @@ -181,4 +181,11 @@ pre { -webkit-border-radius: 0 !important; -moz-border-radius: 0 !important; border-radius: 0 !important; +} + +.text-break { + /* TODO: This is .text-break cloned from Bootstrap 4.3 with a fix for browsers not supporting break-word. Remove later. */ + word-break: break-all !important; + word-break: break-word !important; + overflow-wrap: break-word !important; } \ No newline at end of file diff --git a/CTFd/themes/admin/templates/modals/challenges/flags.html b/CTFd/themes/admin/templates/modals/challenges/flags.html index 76870d5..5996b5e 100644 --- a/CTFd/themes/admin/templates/modals/challenges/flags.html +++ b/CTFd/themes/admin/templates/modals/challenges/flags.html @@ -10,7 +10,7 @@ {% for flag in flags %} {{ flag.type }} - +
{{ flag.content }}
diff --git a/CTFd/themes/admin/templates/modals/challenges/hints.html b/CTFd/themes/admin/templates/modals/challenges/hints.html index 5f05c47..7efa7bd 100644 --- a/CTFd/themes/admin/templates/modals/challenges/hints.html +++ b/CTFd/themes/admin/templates/modals/challenges/hints.html @@ -11,7 +11,7 @@ {% for hint in challenge.hints %} {{ hint.type }} -
{{ hint.content }}
+
{{ hint.content }}
{{ hint.cost }}