diff --git a/castellum/contacts/static/js/availability.js b/castellum/contacts/static/js/availability.js index 4824dcd0c41d802e521e213bc401287c64f6da44..d959208dc96cc772be9558bc5044805440e83dd4 100644 --- a/castellum/contacts/static/js/availability.js +++ b/castellum/contacts/static/js/availability.js @@ -30,7 +30,7 @@ availability.querySelectorAll('select').forEach(function(select) { var label = document.createElement('label'); label.className = 'd-block mb-0'; - label.innerHTML = '' + + label.innerHTML = '' + ''; label.querySelector('span').textContent = django.gettext('All day'); select.before(label); @@ -43,7 +43,7 @@ $$.on(availability, 'change', 'select', function() { // hours --> day - var wholeDay = this.closest('.form-group').querySelector('[data-js="toggle-day"]'); + var wholeDay = this.closest('.col-6').querySelector('[data-js="toggle-day"]'); setCheckbox(this, wholeDay); // hours --> week @@ -52,7 +52,7 @@ $$.on(availability, 'change', '[data-js="toggle-day"]', function() { // day --> hours - var select = this.closest('.form-group').querySelector('select'); + var select = this.closest('.col-6').querySelector('select'); select.querySelectorAll('option').forEach(option => { option.selected = this.checked; }); @@ -76,7 +76,7 @@ // set initial state of day checkboxes document.querySelectorAll('[data-js="toggle-day"]').forEach(function(wholeDay) { - var select = wholeDay.closest('.form-group').querySelector('select'); + var select = wholeDay.closest('.col-6').querySelector('select'); setCheckbox(select, wholeDay); }); diff --git a/castellum/contacts/templates/contacts/__contact_form_self.html b/castellum/contacts/templates/contacts/__contact_form_self.html index 529aca97dd799fb0d4b7e4bfcf756e22086dcf90..5a764548da1dc28b4595b92fb95f12c3032bf22d 100644 --- a/castellum/contacts/templates/contacts/__contact_form_self.html +++ b/castellum/contacts/templates/contacts/__contact_form_self.html @@ -1,7 +1,7 @@ -{% load bootstrap4 %} +{% load django_bootstrap5 %} {% bootstrap_field form.email %} -
+
{% bootstrap_field form.phone_number %}
@@ -9,7 +9,7 @@ {% bootstrap_field form.phone_number_alternative %}
-
+
{% bootstrap_field form.address.street %}
@@ -17,7 +17,7 @@ {% bootstrap_field form.address.house_number %}
-
+
{% bootstrap_field form.address.zip_code %}
diff --git a/castellum/contacts/templates/contacts/__contact_form_top.html b/castellum/contacts/templates/contacts/__contact_form_top.html index 3224c1ba3d0871a3aa378fad26a53393d39abd4c..e81793ccae53aae826e25019ea68b094112feb26 100644 --- a/castellum/contacts/templates/contacts/__contact_form_top.html +++ b/castellum/contacts/templates/contacts/__contact_form_top.html @@ -1,6 +1,6 @@ -{% load bootstrap4 %} +{% load django_bootstrap5 %} -
+
{% bootstrap_field form.title %}
diff --git a/castellum/contacts/templates/contacts/contact_form.html b/castellum/contacts/templates/contacts/contact_form.html index 5971fcf355fecb5fe8d9a75db2d5090492a0b2f5..cd08d509f80922771178bf5b77338b6313dc860f 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 django_bootstrap5 %} {% block title %} {% if object %} diff --git a/castellum/execution/templates/execution/participation_appointments.html b/castellum/execution/templates/execution/participation_appointments.html index 12b7eddcfbabd05cc66d470f11b9d62434498c64..0f4233d84b0c4753acc045a76b6f845cc5f46fc6 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 django_bootstrap5 utils %} {% block content %}
@@ -9,10 +9,10 @@ {% if appointment %}
-
+ {% csrf_token %} - {% bootstrap_field form.show_up show_label=False %} - + {% bootstrap_field form.show_up layout='inline' inline_field_class='hack-not-col-12' %} +
{% else %} diff --git a/castellum/execution/templates/execution/participation_appointments_form.html b/castellum/execution/templates/execution/participation_appointments_form.html index ca0c46dc03a20b6bfefb1ba280385adfd20edb77..7acc39f5d34f735b5af9679c32ca3dc5aecf9c4d 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 django_bootstrap5 utils %} {% block content %} {% if study.session_instructions %} @@ -23,8 +23,8 @@
{% for entry in form.appointments %} -
- {% bootstrap_field entry.field form_group_class="" %} +
+ {% bootstrap_field entry.field layout='inline' %} {% if entry.invitation_url == 'not-invited' %}

{% translate 'Scheduler only available for participating subjects.' %} diff --git a/castellum/execution/templates/execution/participation_news.html b/castellum/execution/templates/execution/participation_news.html index b1cd24bde8c0217d7ad46c067bfaf0b0ee5c6760..0160c9da038034c6dc37721b7c54c24740da4b02 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 django_bootstrap5 %} {% block content %}

diff --git a/castellum/execution/templates/execution/study_detail.html b/castellum/execution/templates/execution/study_detail.html index 9571e4a51816a682483a05824b4f9f7709ace019..4c2ba02b6232c2eab1a69e5963b96a336f0a434e 100644 --- a/castellum/execution/templates/execution/study_detail.html +++ b/castellum/execution/templates/execution/study_detail.html @@ -6,13 +6,13 @@ {% for participation, can_access in list %}
  • {% if can_access %} -
    +
    {{ participation.subject.contact.full_name }} {% with summary=participation.subject|showup_summary %} {% endwith %} {% if session_count > 0 %} - + {% icon 'calendar' label=_('Appointments') %} {{ participation.appointment_count }}/{{ session_count }} {% if participation.appointment_today %} @@ -21,10 +21,10 @@ {% endif %} {% if participation.subject.blocked %} - {{ participation.subject|verbose_name:'blocked' }} + {{ participation.subject|verbose_name:'blocked' }} {% endif %} {% if participation.subject.deceased %} - {{ participation.subject|verbose_name:'deceased' }} + {{ participation.subject|verbose_name:'deceased' }} {% endif %}
    @@ -32,7 +32,7 @@
    {% else %}
    -
    +
    {% translate 'access denied' %} {% icon 'ban' %}
    diff --git a/castellum/execution/templates/execution/study_export.html b/castellum/execution/templates/execution/study_export.html index fec277cda2307bbdb7f37294d607a7eec6135a52..6a7a5e73b03f1859ab60d174abdd206c34383081 100644 --- a/castellum/execution/templates/execution/study_export.html +++ b/castellum/execution/templates/execution/study_export.html @@ -1,5 +1,5 @@ {% extends "execution/study_base.html" %} -{% load i18n bootstrap4 %} +{% load i18n django_bootstrap5 %} {% block title %}{% translate 'Export' %} · {{ block.super }}{% endblock %} diff --git a/castellum/execution/templates/execution/study_news_mail.html b/castellum/execution/templates/execution/study_news_mail.html index 904d44b7f9bb78740f7bb1e5367ef58942d084ec..20fc0478388138f7fa264bdf72148961c8d3c293 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 django_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 3ee8cf6f63680efd814c7eeb51b1da8afec08d11..e64d94f19c7f10ea1afe076874389c5241fa29c7 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 django_bootstrap5 %} {% block content %} diff --git a/castellum/recruitment/static/js/contact.js b/castellum/recruitment/static/js/contact.js index 6ab78d13e1571e2122ba8e0152cab83741ed40b8..679a38ce07ccc081785c3c15524f5fe72a0843e8 100644 --- a/castellum/recruitment/static/js/contact.js +++ b/castellum/recruitment/static/js/contact.js @@ -2,7 +2,7 @@ var setVisibility = function() { var status = document.querySelector('[name="status"]'); var followupInput = document.querySelector('[name="followup_date"]'); - var followup = followupInput.closest('.form-row'); + var followup = followupInput.closest('.row'); if (status.value === '4') { followup.hidden = false; @@ -38,6 +38,8 @@ }); if (document.querySelector('#appointments .is-invalid')) { - $('#appointments-tab').tab('show'); + var el = document.querySelector('#appointments-tab'); + var tab = new bootstrap.Tab(el); + tab.show(); } })(); diff --git a/castellum/recruitment/static/js/filters.js b/castellum/recruitment/static/js/filters.js index f1082e2581c544297383800153249ec84db4174d..3a9782a871e0e350d2f91076fdea2d1087dc5e2f 100644 --- a/castellum/recruitment/static/js/filters.js +++ b/castellum/recruitment/static/js/filters.js @@ -7,7 +7,7 @@ var template = document.getElementById('template-' + pk); if (template) { var formrow = document.createElement('div'); - formrow.className = 'form-row mb-3'; + formrow.className = 'row gx-2 mb-3'; formrow.innerHTML = template.innerHTML.replace(/{prefix}/g, 'form-' + totalForms.value); container.append(formrow); totalForms.value = parseInt(totalForms.value, 10) + 1; @@ -16,7 +16,7 @@ }); $$.on(document, 'click', '[data-js="filter-delete"]', function() { - var formrow = this.closest('.form-row'); + var formrow = this.closest('.row'); var index = Array.prototype.indexOf.call(formrow.parentElement.children, formrow); formrow.querySelector('[name^="form-' + index + '-value"]').remove(); diff --git a/castellum/recruitment/templates/recruitment/__recruitment_list.html b/castellum/recruitment/templates/recruitment/__recruitment_list.html index 97d0841b139ca16c8ee4888e7ceee75cc5ce1aed..964eeb2e487456ab4147f0f9ef59de03b2c5f248 100644 --- a/castellum/recruitment/templates/recruitment/__recruitment_list.html +++ b/castellum/recruitment/templates/recruitment/__recruitment_list.html @@ -6,31 +6,31 @@ {% if can_access %}
    last_agreeable_contact_time %}class="text-muted"{% endif %}>
    - + {% for desc, bucket in buckets %} - {{ bucket }} + {{ bucket }} {% endfor %} {% if participation.status_open and participation.status != participation.NOT_CONTACTED %} - {{ participation|display:'status' }} + {{ participation|display:'status' }} {% endif %} {% if participation.status == participation.INVITED and session_count > 0 %} - + {% icon 'calendar' label=_('Appointments') %} {{ participation.appointment_count }}/{{ session_count }} {% endif %} {% if participation.subject.blocked %} - {{ participation.subject|verbose_name:'blocked' }} + {{ participation.subject|verbose_name:'blocked' }} {% endif %}
    {% if participation.status_open and participation.last_contacted_elsewhere.date > last_agreeable_contact_time %} -
    +
    {% translate 'recently contacted in another recruitment' %} {% icon 'phone-slash' %}
    {% elif participation.status == participation.NOT_REACHED or participation.status == participation.AWAITING_RESPONSE %} -
    +
    {% blocktranslate count attempts=participation.attempts %} {{ attempts }} attempt @@ -41,7 +41,7 @@
    {% translate 'last' %}:
    {% elif participation.status == participation.FOLLOWUP_APPOINTED %} -
    +
    {% if participation.followup_date|is_today %} {% if participation.followup_time %} @@ -81,8 +81,8 @@
    {% else %}
    - -
    + +
    {% translate 'access denied' %}
    diff --git a/castellum/recruitment/templates/recruitment/age_widget.html b/castellum/recruitment/templates/recruitment/age_widget.html index f3e2a4af1c817ad99c04b1b5346e57d82c20789a..cb354a81ceaf84b06e7e7a2d9610c210c4340009 100644 --- a/castellum/recruitment/templates/recruitment/age_widget.html +++ b/castellum/recruitment/templates/recruitment/age_widget.html @@ -1,4 +1,4 @@ -
    +
    {% for widget in widget.subwidgets %}
    {% include widget.template_name %} diff --git a/castellum/recruitment/templates/recruitment/attributes_form.html b/castellum/recruitment/templates/recruitment/attributes_form.html index 42d10693dfa8a830e55fa33b13402648ca07c718..b91667cb4008dcc01d683c3bf80d644e3e6acadb 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 django_bootstrap5 %} {% block title %}{% translate "Edit attributes" %} · {{ block.super }}{% endblock %} @@ -9,8 +9,8 @@ {% csrf_token %} {% for field, answer_declined in uncategorized %} -
    - {% bootstrap_field field form_group_class="" %} +
    + {% bootstrap_field field layout="inline" %}
    @@ -22,8 +22,8 @@
    {{ category }} {% for field, answer_declined in fields %} -
    - {% bootstrap_field field form_group_class="" %} +
    + {% bootstrap_field field layout="inline" %}
    diff --git a/castellum/recruitment/templates/recruitment/cleanup.html b/castellum/recruitment/templates/recruitment/cleanup.html index 4e31175a149d637e0f4e582785eb4df7fd82219d..a769366f81822aea952575bd091a0915c367e7ac 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 django_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 093fd88c74cd2f127591f06ebf70e83c7f753329..4ee22709770886b8b7bc7b906a22b5ab99c6943f 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 %} +{% load i18n static django_bootstrap5 utils auth %} {% block title %}{% translate "Recruitment" %} · {{ study }} · {{ block.super }}{% endblock %} @@ -9,7 +9,7 @@ {{ subject.contact.full_name }} - {{ object|display:'status' }} + {{ object|display:'status' }}
    {% endblock %} @@ -40,14 +40,14 @@ {% if view.subtab == 'open' %} -