From c845cbeb47a583c10bf5503892eb41de31f17722 Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Mon, 25 Jan 2021 13:18:21 +0100 Subject: [PATCH] avoid negative margins - not available in bootstrap5 - hacky in the first place --- castellum/contacts/static/js/availability.js | 6 +++++- .../participation_appointments_form.html | 18 +++++++++--------- .../templates/recruitment/contact.html | 18 +++++++++--------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/castellum/contacts/static/js/availability.js b/castellum/contacts/static/js/availability.js index d7e85986d..4824dcd0c 100644 --- a/castellum/contacts/static/js/availability.js +++ b/castellum/contacts/static/js/availability.js @@ -14,6 +14,10 @@ }; var generateCheckboxes = function() { + availability.querySelectorAll('label').forEach(function(label) { + label.classList.add('mb-0'); + }); + // whole week var label = document.createElement('label'); label.className = 'form-check mb-0'; @@ -25,7 +29,7 @@ // whole days availability.querySelectorAll('select').forEach(function(select) { var label = document.createElement('label'); - label.className = 'd-block mb-0 mt-n1'; + label.className = 'd-block mb-0'; label.innerHTML = '' + ''; label.querySelector('span').textContent = django.gettext('All day'); diff --git a/castellum/execution/templates/execution/participation_appointments_form.html b/castellum/execution/templates/execution/participation_appointments_form.html index c5d76b00a..f18546e07 100644 --- a/castellum/execution/templates/execution/participation_appointments_form.html +++ b/castellum/execution/templates/execution/participation_appointments_form.html @@ -23,19 +23,19 @@ {% for entry in form.appointments %} - {% bootstrap_field entry.field %} - {% if entry.invitation_url == 'not-invited' %} -

- {% translate 'Scheduler only available for invited subjects.' %} -

- {% elif entry.invitation_url %} -

+

+ {% bootstrap_field entry.field form_group_class="" %} + {% if entry.invitation_url == 'not-invited' %} +

+ {% translate 'Scheduler only available for invited subjects.' %} +

+ {% elif entry.invitation_url %} {% translate 'Select timeslot for this subject' %} -

- {% endif %} + {% endif %} +
{% endfor %}
diff --git a/castellum/recruitment/templates/recruitment/contact.html b/castellum/recruitment/templates/recruitment/contact.html index 6d18a788a..a746d7395 100644 --- a/castellum/recruitment/templates/recruitment/contact.html +++ b/castellum/recruitment/templates/recruitment/contact.html @@ -167,19 +167,19 @@ {% for entry in form.appointments %} - {% bootstrap_field entry.field %} - {% if entry.invitation_url == 'not-invited' %} -

- {% translate 'Scheduler only available for invited subjects.' %} -

- {% elif entry.invitation_url %} -

+

+ {% bootstrap_field entry.field form_group_class="" %} + {% if entry.invitation_url == 'not-invited' %} +

+ {% translate 'Scheduler only available for invited subjects.' %} +

+ {% elif entry.invitation_url %} {% translate 'Select timeslot for this subject' %} -

- {% endif %} + {% endif %} +
{% endfor %} {% translate 'Calendar' %}
-- GitLab