From df54ea269df7010e39e27f533f1a2f924eff9147 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Wed, 17 Jun 2020 09:29:05 +0200 Subject: [PATCH 01/19] replace django-bootstrap4 by django-bs5 --- .../templates/contacts/__contact_form_self.html | 2 +- .../templates/contacts/__contact_form_top.html | 2 +- .../contacts/templates/contacts/contact_form.html | 2 +- .../execution/participation_appointments.html | 2 +- .../execution/participation_appointments_form.html | 2 +- .../templates/execution/participation_news.html | 2 +- .../templates/execution/study_news_mail.html | 2 +- .../execution/templates/execution/study_resolve.html | 2 +- .../templates/recruitment/attributes_form.html | 2 +- .../recruitment/templates/recruitment/cleanup.html | 2 +- .../recruitment/templates/recruitment/contact.html | 2 +- castellum/recruitment/templates/recruitment/mail.html | 2 +- castellum/settings/default.py | 11 +++++------ castellum/studies/templates/studies/filtergroup.html | 2 +- .../templates/studies/study_excluded_studies.html | 2 +- .../templates/studies/study_exclusioncriteria.html | 2 +- castellum/studies/templates/studies/study_form.html | 2 +- castellum/studies/templates/studies/study_import.html | 2 +- castellum/studies/templates/studies/study_list.html | 2 +- .../studies/templates/studies/study_mailsettings.html | 2 +- .../studies/templates/studies/study_members.html | 2 +- .../studies/study_recruitmentsettings_form.html | 2 +- .../studies/templates/studies/study_sessions.html | 2 +- .../templates/studies/studymembership_form.html | 2 +- .../studies/templates/studies/studysession_form.html | 2 +- .../subjects/templates/subjects/guardian_search.html | 2 +- .../templates/subjects/maintenance_attributes.html | 2 +- .../templates/subjects/maintenance_consent.html | 2 +- .../templates/subjects/maintenance_contact.html | 2 +- .../templates/subjects/maintenance_duplicates.html | 2 +- .../templates/subjects/maintenance_showup.html | 2 +- .../templates/subjects/maintenance_waiting.html | 2 +- .../subjects/subject_additional_info_form.html | 2 +- .../subjects/subject_data_protection_form.html | 2 +- .../subjects/templates/subjects/subject_detail.html | 2 +- .../subjects/templates/subjects/subject_search.html | 2 +- castellum/templates/base.html | 2 +- castellum/templates/login.html | 2 +- setup.cfg | 2 +- 39 files changed, 43 insertions(+), 44 deletions(-) diff --git a/castellum/contacts/templates/contacts/__contact_form_self.html b/castellum/contacts/templates/contacts/__contact_form_self.html index 529aca97d..b02cc0cd6 100644 --- a/castellum/contacts/templates/contacts/__contact_form_self.html +++ b/castellum/contacts/templates/contacts/__contact_form_self.html @@ -1,4 +1,4 @@ -{% load bootstrap4 %} +{% load bootstrap5 %} {% bootstrap_field form.email %}
diff --git a/castellum/contacts/templates/contacts/__contact_form_top.html b/castellum/contacts/templates/contacts/__contact_form_top.html index 3224c1ba3..b830991e2 100644 --- a/castellum/contacts/templates/contacts/__contact_form_top.html +++ b/castellum/contacts/templates/contacts/__contact_form_top.html @@ -1,4 +1,4 @@ -{% load bootstrap4 %} +{% load bootstrap5 %}
diff --git a/castellum/contacts/templates/contacts/contact_form.html b/castellum/contacts/templates/contacts/contact_form.html index 5971fcf35..713db468c 100644 --- a/castellum/contacts/templates/contacts/contact_form.html +++ b/castellum/contacts/templates/contacts/contact_form.html @@ -1,5 +1,5 @@ {% extends base_template|default:"subjects/base.html" %} -{% load static i18n bootstrap4 %} +{% load static i18n bootstrap5 %} {% block title %} {% if object %} diff --git a/castellum/execution/templates/execution/participation_appointments.html b/castellum/execution/templates/execution/participation_appointments.html index a28766e14..69559b562 100644 --- a/castellum/execution/templates/execution/participation_appointments.html +++ b/castellum/execution/templates/execution/participation_appointments.html @@ -1,5 +1,5 @@ {% extends "execution/participation_base.html" %} -{% load i18n auth bootstrap4 utils %} +{% load i18n auth bootstrap5 utils %} {% block content %}
diff --git a/castellum/execution/templates/execution/participation_appointments_form.html b/castellum/execution/templates/execution/participation_appointments_form.html index f18546e07..523cb6386 100644 --- a/castellum/execution/templates/execution/participation_appointments_form.html +++ b/castellum/execution/templates/execution/participation_appointments_form.html @@ -1,5 +1,5 @@ {% extends "execution/participation_base.html" %} -{% load i18n static bootstrap4 utils %} +{% load i18n static bootstrap5 utils %} {% block content %} {% if study.session_instructions %} diff --git a/castellum/execution/templates/execution/participation_news.html b/castellum/execution/templates/execution/participation_news.html index b1cd24bde..e67d1b111 100644 --- a/castellum/execution/templates/execution/participation_news.html +++ b/castellum/execution/templates/execution/participation_news.html @@ -1,5 +1,5 @@ {% extends "execution/participation_base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block content %}
diff --git a/castellum/execution/templates/execution/study_news_mail.html b/castellum/execution/templates/execution/study_news_mail.html index 877890c4b..f47f1a6ed 100644 --- a/castellum/execution/templates/execution/study_news_mail.html +++ b/castellum/execution/templates/execution/study_news_mail.html @@ -1,5 +1,5 @@ {% extends "execution/study_base.html" %} -{% load i18n bootstrap4 humanize utils %} +{% load i18n bootstrap5 humanize utils %} {% block content %}

{% translate 'This form allows you to send a message to all subjects who indicated interest in study news. You cannot attach a document to the email, but you can include a link.' %}

diff --git a/castellum/execution/templates/execution/study_resolve.html b/castellum/execution/templates/execution/study_resolve.html index d39ac547b..2a4ecc3e8 100644 --- a/castellum/execution/templates/execution/study_resolve.html +++ b/castellum/execution/templates/execution/study_resolve.html @@ -1,5 +1,5 @@ {% extends "execution/study_base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block content %} diff --git a/castellum/recruitment/templates/recruitment/attributes_form.html b/castellum/recruitment/templates/recruitment/attributes_form.html index 42d10693d..7138a652d 100644 --- a/castellum/recruitment/templates/recruitment/attributes_form.html +++ b/castellum/recruitment/templates/recruitment/attributes_form.html @@ -1,5 +1,5 @@ {% extends base_template|default:"recruitment/base.html" %} -{% load static i18n bootstrap4 %} +{% load static i18n bootstrap5 %} {% block title %}{% translate "Edit attributes" %} · {{ block.super }}{% endblock %} diff --git a/castellum/recruitment/templates/recruitment/cleanup.html b/castellum/recruitment/templates/recruitment/cleanup.html index b959691ea..e8b18ebdf 100644 --- a/castellum/recruitment/templates/recruitment/cleanup.html +++ b/castellum/recruitment/templates/recruitment/cleanup.html @@ -1,5 +1,5 @@ {% extends "recruitment/recruitment_base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block title %}{% translate "Recruitment" %} · {{ study }} · {{ block.super }}{% endblock %} diff --git a/castellum/recruitment/templates/recruitment/contact.html b/castellum/recruitment/templates/recruitment/contact.html index a746d7395..6324e9c24 100644 --- a/castellum/recruitment/templates/recruitment/contact.html +++ b/castellum/recruitment/templates/recruitment/contact.html @@ -1,5 +1,5 @@ {% extends "recruitment/base.html" %} -{% load i18n static bootstrap4 utils auth appointments %} +{% load i18n static bootstrap5 utils auth appointments %} {% block title %}{% translate "Recruitment" %} · {{ study }} · {{ block.super }}{% endblock %} diff --git a/castellum/recruitment/templates/recruitment/mail.html b/castellum/recruitment/templates/recruitment/mail.html index ca8a93978..5cf3b8048 100644 --- a/castellum/recruitment/templates/recruitment/mail.html +++ b/castellum/recruitment/templates/recruitment/mail.html @@ -1,5 +1,5 @@ {% extends base_template|default:"recruitment/recruitment_base.html" %} -{% load i18n auth bootstrap4 humanize utils %} +{% load i18n auth bootstrap5 humanize utils %} {% block title %}{% translate "Mail recruitment" %} · {{ block.super }}{% endblock %} diff --git a/castellum/settings/default.py b/castellum/settings/default.py index aaa2761f8..a59807d98 100644 --- a/castellum/settings/default.py +++ b/castellum/settings/default.py @@ -25,7 +25,9 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', - 'bootstrap4', + 'django-bs5', + 'django.forms', + 'phonenumber_field', 'parler', 'stronghold', @@ -81,6 +83,8 @@ TEMPLATES = [ }, ] +FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' + WSGI_APPLICATION = 'castellum.wsgi.application' @@ -210,11 +214,6 @@ NPM_FILE_PATTERNS = { ], } -BOOTSTRAP4 = { - 'set_placeholder': False, - 'success_css_class': None, -} - AXES_LOCKOUT_TEMPLATE = 'axes-lockout.html' diff --git a/castellum/studies/templates/studies/filtergroup.html b/castellum/studies/templates/studies/filtergroup.html index 4f41b0e4d..16beba0a5 100644 --- a/castellum/studies/templates/studies/filtergroup.html +++ b/castellum/studies/templates/studies/filtergroup.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load static i18n bootstrap4 utils %} +{% load static i18n bootstrap5 utils %} {% block title %}{% translate "Filters" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_excluded_studies.html b/castellum/studies/templates/studies/study_excluded_studies.html index c39fe63a2..8cea79e64 100644 --- a/castellum/studies/templates/studies/study_excluded_studies.html +++ b/castellum/studies/templates/studies/study_excluded_studies.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load i18n auth bootstrap4 %} +{% load i18n auth bootstrap5 %} {% block title %}{% translate "Excluded studies" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_exclusioncriteria.html b/castellum/studies/templates/studies/study_exclusioncriteria.html index dfde99ba7..d2b4df49a 100644 --- a/castellum/studies/templates/studies/study_exclusioncriteria.html +++ b/castellum/studies/templates/studies/study_exclusioncriteria.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load i18n auth bootstrap4 %} +{% load i18n auth bootstrap5 %} {% block title %}{% translate "Inclusion/exclusion criteria" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_form.html b/castellum/studies/templates/studies/study_form.html index f66be0aa2..bd7893aa6 100644 --- a/castellum/studies/templates/studies/study_form.html +++ b/castellum/studies/templates/studies/study_form.html @@ -1,5 +1,5 @@ {% extends base_template|default:"studies/base.html" %} -{% load static i18n bootstrap4 utils %} +{% load static i18n bootstrap5 utils %} {% block title %} {% if object %} diff --git a/castellum/studies/templates/studies/study_import.html b/castellum/studies/templates/studies/study_import.html index 57365f947..d6bb1376a 100644 --- a/castellum/studies/templates/studies/study_import.html +++ b/castellum/studies/templates/studies/study_import.html @@ -1,5 +1,5 @@ {% extends "studies/base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block title %}{% translate 'Import' %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_list.html b/castellum/studies/templates/studies/study_list.html index 2a946095a..c3860da8a 100644 --- a/castellum/studies/templates/studies/study_list.html +++ b/castellum/studies/templates/studies/study_list.html @@ -1,5 +1,5 @@ {% extends "studies/base.html" %} -{% load i18n static auth bootstrap4 utils %} +{% load i18n static auth bootstrap5 utils %} {% block title %}{% translate "Studies" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_mailsettings.html b/castellum/studies/templates/studies/study_mailsettings.html index 3631058a7..465272bd3 100644 --- a/castellum/studies/templates/studies/study_mailsettings.html +++ b/castellum/studies/templates/studies/study_mailsettings.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load i18n auth bootstrap4 %} +{% load i18n auth bootstrap5 %} {% block title %}{% translate "Mail Settings" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_members.html b/castellum/studies/templates/studies/study_members.html index d359713ef..b0327186d 100644 --- a/castellum/studies/templates/studies/study_members.html +++ b/castellum/studies/templates/studies/study_members.html @@ -1,5 +1,5 @@ {% extends "studies/study_base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block title %}{% translate "Member management" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/study_recruitmentsettings_form.html b/castellum/studies/templates/studies/study_recruitmentsettings_form.html index 4ee2cfb6e..5c9420ad0 100644 --- a/castellum/studies/templates/studies/study_recruitmentsettings_form.html +++ b/castellum/studies/templates/studies/study_recruitmentsettings_form.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load static i18n bootstrap4 %} +{% load static i18n bootstrap5 %} {% block title %} {% translate "General recruitment settings" %} · {{ block.super }} diff --git a/castellum/studies/templates/studies/study_sessions.html b/castellum/studies/templates/studies/study_sessions.html index 2ce72cf0d..4da7b0641 100644 --- a/castellum/studies/templates/studies/study_sessions.html +++ b/castellum/studies/templates/studies/study_sessions.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load static i18n auth bootstrap4 %} +{% load static i18n auth bootstrap5 %} {% block title %}{% translate "Sessions" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/studymembership_form.html b/castellum/studies/templates/studies/studymembership_form.html index 5b53f747d..7c6126cc0 100644 --- a/castellum/studies/templates/studies/studymembership_form.html +++ b/castellum/studies/templates/studies/studymembership_form.html @@ -1,5 +1,5 @@ {% extends "studies/study_base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block title %}{{ object.user }} · {% translate "Member management" %} · {{ block.super }}{% endblock %} diff --git a/castellum/studies/templates/studies/studysession_form.html b/castellum/studies/templates/studies/studysession_form.html index ab05faa6d..adc763ca1 100644 --- a/castellum/studies/templates/studies/studysession_form.html +++ b/castellum/studies/templates/studies/studysession_form.html @@ -1,5 +1,5 @@ {% extends "studies/study_recruitmentsettings_base.html" %} -{% load static i18n bootstrap4 %} +{% load static i18n bootstrap5 %} {% block title %}{% translate "Sessions" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/guardian_search.html b/castellum/subjects/templates/subjects/guardian_search.html index b8370025c..40bcc0209 100644 --- a/castellum/subjects/templates/subjects/guardian_search.html +++ b/castellum/subjects/templates/subjects/guardian_search.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load i18n static bootstrap4 auth utils %} +{% load i18n static bootstrap5 auth utils %} {% block title %}{% translate "Guardians" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/maintenance_attributes.html b/castellum/subjects/templates/subjects/maintenance_attributes.html index 6bc3929a5..ddcf34a4c 100644 --- a/castellum/subjects/templates/subjects/maintenance_attributes.html +++ b/castellum/subjects/templates/subjects/maintenance_attributes.html @@ -1,5 +1,5 @@ {% extends "subjects/maintenance_base.html" %} -{% load i18n bootstrap4 auth %} +{% load i18n bootstrap5 auth %} {% block title %}{% translate "Attributes" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/maintenance_consent.html b/castellum/subjects/templates/subjects/maintenance_consent.html index f9057c96e..09f71229b 100644 --- a/castellum/subjects/templates/subjects/maintenance_consent.html +++ b/castellum/subjects/templates/subjects/maintenance_consent.html @@ -1,5 +1,5 @@ {% extends "subjects/maintenance_base.html" %} -{% load i18n bootstrap4 auth %} +{% load i18n bootstrap5 auth %} {% block title %}{% translate "Consent" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/maintenance_contact.html b/castellum/subjects/templates/subjects/maintenance_contact.html index ee259abcc..d175c8e43 100644 --- a/castellum/subjects/templates/subjects/maintenance_contact.html +++ b/castellum/subjects/templates/subjects/maintenance_contact.html @@ -1,5 +1,5 @@ {% extends "subjects/maintenance_base.html" %} -{% load i18n bootstrap4 auth %} +{% load i18n bootstrap5 auth %} {% block title %}{% translate "Contact" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/maintenance_duplicates.html b/castellum/subjects/templates/subjects/maintenance_duplicates.html index d5110442d..049bba5db 100644 --- a/castellum/subjects/templates/subjects/maintenance_duplicates.html +++ b/castellum/subjects/templates/subjects/maintenance_duplicates.html @@ -1,5 +1,5 @@ {% extends "subjects/maintenance_base.html" %} -{% load i18n bootstrap4 auth %} +{% load i18n bootstrap5 auth %} {% block title %}{% translate "Duplicates" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/maintenance_showup.html b/castellum/subjects/templates/subjects/maintenance_showup.html index 31e2f51f1..a753901eb 100644 --- a/castellum/subjects/templates/subjects/maintenance_showup.html +++ b/castellum/subjects/templates/subjects/maintenance_showup.html @@ -1,5 +1,5 @@ {% extends "subjects/maintenance_base.html" %} -{% load i18n bootstrap4 auth %} +{% load i18n bootstrap5 auth %} {% block title %}{% translate "Waiting for consent" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/maintenance_waiting.html b/castellum/subjects/templates/subjects/maintenance_waiting.html index 18395b18b..afe6b2283 100644 --- a/castellum/subjects/templates/subjects/maintenance_waiting.html +++ b/castellum/subjects/templates/subjects/maintenance_waiting.html @@ -1,5 +1,5 @@ {% extends "subjects/maintenance_base.html" %} -{% load i18n bootstrap4 auth %} +{% load i18n bootstrap5 auth %} {% block title %}{% translate "Waiting for consent" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/subject_additional_info_form.html b/castellum/subjects/templates/subjects/subject_additional_info_form.html index f5f7afa68..349eb3eb7 100644 --- a/castellum/subjects/templates/subjects/subject_additional_info_form.html +++ b/castellum/subjects/templates/subjects/subject_additional_info_form.html @@ -1,5 +1,5 @@ {% extends base_template|default:"subjects/base.html" %} -{% load static i18n bootstrap4 utils %} +{% load static i18n bootstrap5 utils %} {% block title %} {% translate "Edit subject" %} · {{ block.super }} diff --git a/castellum/subjects/templates/subjects/subject_data_protection_form.html b/castellum/subjects/templates/subjects/subject_data_protection_form.html index b2153e3d6..7191547fa 100644 --- a/castellum/subjects/templates/subjects/subject_data_protection_form.html +++ b/castellum/subjects/templates/subjects/subject_data_protection_form.html @@ -1,5 +1,5 @@ {% extends base_template|default:"subjects/base.html" %} -{% load static i18n bootstrap4 utils %} +{% load static i18n bootstrap5 utils %} {% block title %} {% translate "Edit subject" %} · {{ block.super }} diff --git a/castellum/subjects/templates/subjects/subject_detail.html b/castellum/subjects/templates/subjects/subject_detail.html index 46ad6f8db..4862f27f8 100644 --- a/castellum/subjects/templates/subjects/subject_detail.html +++ b/castellum/subjects/templates/subjects/subject_detail.html @@ -1,5 +1,5 @@ {% extends "subjects/subject_base.html" %} -{% load i18n bootstrap4 utils auth appointments %} +{% load i18n bootstrap5 utils auth appointments %} {% block title %}{% translate "Subject details" %} · {{ block.super }}{% endblock %} diff --git a/castellum/subjects/templates/subjects/subject_search.html b/castellum/subjects/templates/subjects/subject_search.html index 4e3d12785..e6ae5d67f 100644 --- a/castellum/subjects/templates/subjects/subject_search.html +++ b/castellum/subjects/templates/subjects/subject_search.html @@ -1,5 +1,5 @@ {% extends "subjects/base.html" %} -{% load i18n bootstrap4 auth utils %} +{% load i18n bootstrap5 auth utils %} {% block title %}{% translate "Subjects" %} · {{ block.super }}{% endblock %} diff --git a/castellum/templates/base.html b/castellum/templates/base.html index d2a5ae4b6..9ae8f93cf 100644 --- a/castellum/templates/base.html +++ b/castellum/templates/base.html @@ -1,5 +1,5 @@ -{% load i18n static bootstrap4 utils %} +{% load i18n static bootstrap5 utils %} {% get_current_language as LANGUAGE_CODE %} {% get_parler_languages as LANGUAGES %} diff --git a/castellum/templates/login.html b/castellum/templates/login.html index 4c9470f67..128e40857 100644 --- a/castellum/templates/login.html +++ b/castellum/templates/login.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load i18n bootstrap4 %} +{% load i18n bootstrap5 %} {% block title %}{% translate "Log in" %} · {{ block.super }}{% endblock %} diff --git a/setup.cfg b/setup.cfg index cee100fb7..2afe460a7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ install_requires = castellum-pseudonyms == 0.0.1 cologne-phonetics == 1.2.5 Django == 3.1.5 - django-bootstrap4 == 2.3.1 + django-bs5 == 5.0.0b1 django-ical == 1.7.1 django-npm == 1.0.0 django-parler == 2.2.0 -- GitLab From 7ef9653f0a55b96e413d435b734a0d41f2c641d9 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 11:25:46 +0100 Subject: [PATCH 02/19] update to bootstrap5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e17c0de6..176a3ca07 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.2", - "bootstrap": "^4.6.0", + "bootstrap": "^5.0.0-beta1", "fullcalendar-scheduler": "^5.5.1", "jdenticon": "^3.1.0", "jquery": "^3.5.1", -- GitLab From 338004296a153348634fcf309cb643eb948b893d Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 14:54:58 +0100 Subject: [PATCH 03/19] update popper --- castellum/settings/default.py | 2 +- castellum/templates/base.html | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/castellum/settings/default.py b/castellum/settings/default.py index a59807d98..0c8da9f42 100644 --- a/castellum/settings/default.py +++ b/castellum/settings/default.py @@ -193,7 +193,7 @@ NPM_FILE_PATTERNS = { ], 'jdenticon': ['dist/jdenticon.min.js'], 'jquery': ['dist/jquery.min.js'], - 'popper.js': ['dist/umd/popper.min.js'], + '@popperjs': ['core/dist/umd/popper-lite.min.js'], '@fortawesome/fontawesome-free': [ 'css/all.min.css', 'webfonts/fa-regular-400.eot', diff --git a/castellum/templates/base.html b/castellum/templates/base.html index 9ae8f93cf..629f22efd 100644 --- a/castellum/templates/base.html +++ b/castellum/templates/base.html @@ -125,7 +125,7 @@ - + diff --git a/package.json b/package.json index 176a3ca07..8679cd348 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,11 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.2", + "@popperjs/core": "^2.6.0", "bootstrap": "^5.0.0-beta1", "fullcalendar-scheduler": "^5.5.1", "jdenticon": "^3.1.0", "jquery": "^3.5.1", - "popper.js": "^1.16.0", "vanillajs-datepicker": "^1.1.2" }, "devDependencies": { -- GitLab From 20ddb49db91436572598deea1657ae2a0c6629d7 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 11:42:30 +0100 Subject: [PATCH 04/19] add new css background images --- castellum/static/images/bootstrap/caret.svg | 3 +++ castellum/static/images/bootstrap/check.svg | 3 +++ castellum/static/images/bootstrap/indeterminate.svg | 3 +++ castellum/static/images/bootstrap/radio.svg | 3 +++ castellum/static/style.css | 12 ++++++++++++ 5 files changed, 24 insertions(+) create mode 100644 castellum/static/images/bootstrap/caret.svg create mode 100644 castellum/static/images/bootstrap/check.svg create mode 100644 castellum/static/images/bootstrap/indeterminate.svg create mode 100644 castellum/static/images/bootstrap/radio.svg diff --git a/castellum/static/images/bootstrap/caret.svg b/castellum/static/images/bootstrap/caret.svg new file mode 100644 index 000000000..84fe61de5 --- /dev/null +++ b/castellum/static/images/bootstrap/caret.svg @@ -0,0 +1,3 @@ + + + diff --git a/castellum/static/images/bootstrap/check.svg b/castellum/static/images/bootstrap/check.svg new file mode 100644 index 000000000..a9e9d0366 --- /dev/null +++ b/castellum/static/images/bootstrap/check.svg @@ -0,0 +1,3 @@ + + + diff --git a/castellum/static/images/bootstrap/indeterminate.svg b/castellum/static/images/bootstrap/indeterminate.svg new file mode 100644 index 000000000..92c4caf32 --- /dev/null +++ b/castellum/static/images/bootstrap/indeterminate.svg @@ -0,0 +1,3 @@ + + + diff --git a/castellum/static/images/bootstrap/radio.svg b/castellum/static/images/bootstrap/radio.svg new file mode 100644 index 000000000..03be3e056 --- /dev/null +++ b/castellum/static/images/bootstrap/radio.svg @@ -0,0 +1,3 @@ + + + diff --git a/castellum/static/style.css b/castellum/static/style.css index d2c1f5c52..4b401c8f5 100644 --- a/castellum/static/style.css +++ b/castellum/static/style.css @@ -44,6 +44,18 @@ .was-validated .form-control:invalid, .form-control.is-invalid { background-image: url("images/bootstrap/invalid.svg"); } +.form-check-input[type="checkbox"]:checked { + background-image: url("images/bootstrap/check.svg"); +} +.form-check-input[type="checkbox"]:indeterminate { + background-image: url("images/bootstrap/indeterminate.svg"); +} +.form-check-input[type="radio"]:checked { + background-image: url("images/bootstrap/radio.svg"); +} +.form-select { + background-image: url("images/bootstrap/caret.svg"); +} /* work around https://github.com/twbs/bootstrap/issues/23454 */ .invalid-feedback { -- GitLab From f5f3cff4a3349b15789c4743f9a8b7142e5321f4 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 13:32:52 +0100 Subject: [PATCH 05/19] adapt css variables --- castellum/static/style.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/castellum/static/style.css b/castellum/static/style.css index 4b401c8f5..80c136b2e 100644 --- a/castellum/static/style.css +++ b/castellum/static/style.css @@ -81,12 +81,12 @@ } .list-group-item-custom { - color: var(--primary); + color: var(--bs-primary); } .list-group-item-custom.active { - color: var(--dark); - background-color: var(--white); + color: var(--bs-dark); + background-color: var(--bs-white); border-color: rgba(0,0,0,.125); position: relative; } @@ -98,7 +98,7 @@ top: 0; bottom: 0; width: 0.25rem; - background-color: var(--primary); + background-color: var(--bs-primary); } .breadcrumb { @@ -109,11 +109,11 @@ } .container { - max-width: var(--breakpoint-md, 768px); + max-width: 768px; } .container-lg { - max-width: var(--breakpoint-lg, 992px); + max-width: 992px; } .text-hyphens { @@ -140,8 +140,8 @@ margin-top: -0.6em; border-radius: 50%; text-align: center; - color: var(--white); - background-color: var(--success); + color: var(--bs-white); + background-color: var(--bs-success); opacity: 0; transition: opacity 300ms ease; } -- GitLab From 7faf049a01d76ade3f6d51377c5d7c15e13ec3b0 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 11:25:38 +0100 Subject: [PATCH 06/19] adapt badges --- .../execution/templates/execution/study_detail.html | 6 +++--- .../templates/recruitment/__recruitment_list.html | 10 +++++----- .../recruitment/templates/recruitment/contact.html | 2 +- .../recruitment/templates/recruitment/recruitment.html | 8 ++++---- castellum/studies/templates/studies/study_base.html | 4 ++-- castellum/studies/templates/studies/study_list.html | 2 +- castellum/studies/templates/studies/study_members.html | 4 ++-- .../studies/templates/studies/study_sessions.html | 4 ++-- .../templates/studies/studymembership_form.html | 2 +- .../subjects/templates/subjects/guardian_search.html | 2 +- .../templates/subjects/subject_add_to_study.html | 2 +- .../subjects/subject_additional_info_form.html | 8 ++++---- .../templates/subjects/subject_confirm_delete.html | 2 +- .../subjects/templates/subjects/subject_search.html | 4 ++-- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/castellum/execution/templates/execution/study_detail.html b/castellum/execution/templates/execution/study_detail.html index 547633aa4..6924a8317 100644 --- a/castellum/execution/templates/execution/study_detail.html +++ b/castellum/execution/templates/execution/study_detail.html @@ -9,16 +9,16 @@
{{ participation.subject.contact.full_name }} {% if session_count > 0 %} - + {{ participation.appointment_count }}/{{ session_count }} {% endif %} {% if participation.appointment_today %} - {% translate 'today' %} + {% translate 'today' %} {% endif %} {% if participation.subject.blocked %} - {{ participation.subject|verbose_name:'blocked' }} + {{ participation.subject|verbose_name:'blocked' }} {% endif %} {% with summary=participation.subject|showup_summary %} diff --git a/castellum/recruitment/templates/recruitment/__recruitment_list.html b/castellum/recruitment/templates/recruitment/__recruitment_list.html index 494d77137..5d1419092 100644 --- a/castellum/recruitment/templates/recruitment/__recruitment_list.html +++ b/castellum/recruitment/templates/recruitment/__recruitment_list.html @@ -11,7 +11,7 @@ {% for desc, bucket in buckets %}
{{ bucket }}
{% endfor %} -
{{ participation|display:'status' }}
+
{{ participation|display:'status' }}
@@ -47,7 +47,7 @@
{{ bucket }}
{% endfor %} {% if participation.status != participation.NOT_CONTACTED %} -
{{ participation|display:'status' }}
+
{{ participation|display:'status' }}
{% endif %}
@@ -62,7 +62,7 @@ {% for desc, bucket in buckets %}
{{ bucket }}
{% endfor %} -
{{ participation|display:'status' }}
+
{{ participation|display:'status' }}
@@ -83,12 +83,12 @@
{{ bucket }}
{% endfor %} {% if participation.status == participation.INVITED and session_count > 0 %} -
+
{{ participation.appointment_count }}/{{ session_count }}
{% if participation.subject.blocked %} - {{ participation.subject|verbose_name:'blocked' }} + {{ participation.subject|verbose_name:'blocked' }} {% endif %} {% endif %}
diff --git a/castellum/recruitment/templates/recruitment/contact.html b/castellum/recruitment/templates/recruitment/contact.html index 6324e9c24..d3c22987c 100644 --- a/castellum/recruitment/templates/recruitment/contact.html +++ b/castellum/recruitment/templates/recruitment/contact.html @@ -9,7 +9,7 @@ {{ subject.contact.full_name }} - {{ object|display:'status' }} + {{ object|display:'status' }}
{% endblock %} diff --git a/castellum/recruitment/templates/recruitment/recruitment.html b/castellum/recruitment/templates/recruitment/recruitment.html index e3b93ab8f..2e5692986 100644 --- a/castellum/recruitment/templates/recruitment/recruitment.html +++ b/castellum/recruitment/templates/recruitment/recruitment.html @@ -17,23 +17,23 @@ diff --git a/castellum/studies/templates/studies/study_base.html b/castellum/studies/templates/studies/study_base.html index 1b224ffe6..bc3a7c29d 100644 --- a/castellum/studies/templates/studies/study_base.html +++ b/castellum/studies/templates/studies/study_base.html @@ -13,10 +13,10 @@

{{ study }}

{% if study.is_started %} - {% translate 'Started' %} + {% translate 'Started' %} {% endif %} {% if study.status == study.FINISHED %} - {% translate 'Finished' %} + {% translate 'Finished' %} {% endif %}

diff --git a/castellum/studies/templates/studies/study_list.html b/castellum/studies/templates/studies/study_list.html index c3860da8a..2e6adc573 100644 --- a/castellum/studies/templates/studies/study_list.html +++ b/castellum/studies/templates/studies/study_list.html @@ -73,7 +73,7 @@

{{ study.contact_person }}
{% endif %} {% if study.status == study.FINISHED %} - {% translate 'Finished' %} + {% translate 'Finished' %} {% endif %}
diff --git a/castellum/studies/templates/studies/study_members.html b/castellum/studies/templates/studies/study_members.html index b0327186d..938c454b6 100644 --- a/castellum/studies/templates/studies/study_members.html +++ b/castellum/studies/templates/studies/study_members.html @@ -22,12 +22,12 @@
{{ membership.user }}
    {% for group in membership.user.groups.all %} -
  • {{ group }}
  • +
  • {{ group }}
  • {% endfor %}
    {% for group in membership.groups.all %} -
  • {{ group }}
  • +
  • {{ group }}
  • {% endfor %}
diff --git a/castellum/studies/templates/studies/study_sessions.html b/castellum/studies/templates/studies/study_sessions.html index 4da7b0641..ea09d6e68 100644 --- a/castellum/studies/templates/studies/study_sessions.html +++ b/castellum/studies/templates/studies/study_sessions.html @@ -12,10 +12,10 @@
{{ session.duration }}{% translate 'min' %} {% for type in session.type.all %} - {{ type }} + {{ type }} {% endfor %} {% if session.resource %} - {{ session.resource }} + {{ session.resource }} {% endif %}
{% translate 'Update' %} diff --git a/castellum/studies/templates/studies/studymembership_form.html b/castellum/studies/templates/studies/studymembership_form.html index 7c6126cc0..a11b576ce 100644 --- a/castellum/studies/templates/studies/studymembership_form.html +++ b/castellum/studies/templates/studies/studymembership_form.html @@ -10,7 +10,7 @@

{% translate 'The User belongs to the following groups in all studies' %}

    {% for group in object.user.groups.all %} -
  • {{ group }}
  • +
  • {{ group }}
  • {% empty %}
  • {% translate 'no global groups' %}
  • {% endfor %} diff --git a/castellum/subjects/templates/subjects/guardian_search.html b/castellum/subjects/templates/subjects/guardian_search.html index 40bcc0209..676ae5027 100644 --- a/castellum/subjects/templates/subjects/guardian_search.html +++ b/castellum/subjects/templates/subjects/guardian_search.html @@ -69,7 +69,7 @@ {% endif %}
{% if subject.blocked %} - {{ subject|verbose_name:'blocked' }} + {{ subject|verbose_name:'blocked' }} {% endif %} {% else %}

{{ contact.full_name }}

diff --git a/castellum/subjects/templates/subjects/subject_add_to_study.html b/castellum/subjects/templates/subjects/subject_add_to_study.html index 5cea334b4..99bcaf498 100644 --- a/castellum/subjects/templates/subjects/subject_add_to_study.html +++ b/castellum/subjects/templates/subjects/subject_add_to_study.html @@ -9,7 +9,7 @@
  • {{ study }}
    {% if study.status == study.FINISHED %} - {% translate 'Finished' %} + {% translate 'Finished' %} {% endif %} {% csrf_token %} diff --git a/castellum/subjects/templates/subjects/subject_additional_info_form.html b/castellum/subjects/templates/subjects/subject_additional_info_form.html index 349eb3eb7..265b94295 100644 --- a/castellum/subjects/templates/subjects/subject_additional_info_form.html +++ b/castellum/subjects/templates/subjects/subject_additional_info_form.html @@ -45,16 +45,16 @@ {% translate "Notes" %}

    {% if subject.note_hard_of_hearing %} - {{ subject|verbose_name:'note_hard_of_hearing' }} + {{ subject|verbose_name:'note_hard_of_hearing' }} {% endif %} {% if subject.note_difficult_to_understand %} - {{ subject|verbose_name:'note_difficult_to_understand' }} + {{ subject|verbose_name:'note_difficult_to_understand' }} {% endif %} {% if subject.note_abusive_language %} - {{ subject|verbose_name:'note_abusive_language' }} + {{ subject|verbose_name:'note_abusive_language' }} {% endif %} {% for note in subject.subjectnote_set.all %} - {{ note.content }} + {{ note.content }} {% endfor %}

    diff --git a/castellum/subjects/templates/subjects/subject_confirm_delete.html b/castellum/subjects/templates/subjects/subject_confirm_delete.html index d81328ce8..5f9e03187 100644 --- a/castellum/subjects/templates/subjects/subject_confirm_delete.html +++ b/castellum/subjects/templates/subjects/subject_confirm_delete.html @@ -27,7 +27,7 @@ {% if participation.status == participation.INVITED %} {{ participation.pseudonym }} {% endif %} - {{ participation|display:'status' }} + {{ participation|display:'status' }}
  • {% if can_view_study %} diff --git a/castellum/subjects/templates/subjects/subject_search.html b/castellum/subjects/templates/subjects/subject_search.html index e6ae5d67f..03715d6ff 100644 --- a/castellum/subjects/templates/subjects/subject_search.html +++ b/castellum/subjects/templates/subjects/subject_search.html @@ -71,7 +71,7 @@ {% endif %}
    {% if subject.blocked %} - {{ subject|verbose_name:'blocked' }} + {{ subject|verbose_name:'blocked' }} {% endif %} {% endif %} {% else %} @@ -96,7 +96,7 @@
    {{ participation.study }} {{ participation.study.contact_person }} - {{ participation|display:'status' }} + {{ participation|display:'status' }}
    {% if can_recruit %} -- GitLab From 8cf6485d0c0ef1fc55f8b972048727542cae2eab Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 11:26:00 +0100 Subject: [PATCH 07/19] adapt breadcrumbs --- castellum/static/style.css | 7 +++++++ castellum/templates/base_with_breadcrumbs.html | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/castellum/static/style.css b/castellum/static/style.css index 80c136b2e..b46411c0b 100644 --- a/castellum/static/style.css +++ b/castellum/static/style.css @@ -155,3 +155,10 @@ display: none !important; } } + +.breadcrumb-item a { + text-decoration: none; +} +.breadcrumb-item a:hover { + text-decoration: underline; +} diff --git a/castellum/templates/base_with_breadcrumbs.html b/castellum/templates/base_with_breadcrumbs.html index 92b1d0388..7ce5ef9c0 100644 --- a/castellum/templates/base_with_breadcrumbs.html +++ b/castellum/templates/base_with_breadcrumbs.html @@ -4,7 +4,7 @@ {% block after_header %}
    {% for entry in form.appointments %} -
    +
    {% bootstrap_field entry.field form_group_class="" %} {% if entry.invitation_url == 'not-invited' %}

    diff --git a/castellum/recruitment/templates/recruitment/attributes_form.html b/castellum/recruitment/templates/recruitment/attributes_form.html index 7138a652d..e479af991 100644 --- a/castellum/recruitment/templates/recruitment/attributes_form.html +++ b/castellum/recruitment/templates/recruitment/attributes_form.html @@ -9,7 +9,7 @@ {% csrf_token %} {% for field, answer_declined in uncategorized %} -

    +
    {% bootstrap_field field form_group_class="" %}
    @@ -22,7 +22,7 @@
    {{ category }} {% for field, answer_declined in fields %} -
    +
    {% bootstrap_field field form_group_class="" %}
    diff --git a/castellum/recruitment/templates/recruitment/contact.html b/castellum/recruitment/templates/recruitment/contact.html index 30a19ee73..46114772c 100644 --- a/castellum/recruitment/templates/recruitment/contact.html +++ b/castellum/recruitment/templates/recruitment/contact.html @@ -167,7 +167,7 @@ {% for entry in form.appointments %} -
    +
    {% bootstrap_field entry.field form_group_class="" %} {% if entry.invitation_url == 'not-invited' %}

    @@ -202,7 +202,7 @@

    {% bootstrap_field form.followup_time %}
    -
    +
    diff --git a/castellum/recruitment/templates/recruitment/mail.html b/castellum/recruitment/templates/recruitment/mail.html index 5cf3b8048..4043c4014 100644 --- a/castellum/recruitment/templates/recruitment/mail.html +++ b/castellum/recruitment/templates/recruitment/mail.html @@ -12,7 +12,7 @@ {% include 'utils/form_errors.html' with form=form %} {% csrf_token %} -
    +