diff --git a/castellum/contacts/forms.py b/castellum/contacts/forms.py index 0947b0c790c0c3a5c5b5371df12987b5139e3a65..579395684ed2f3968db0b7a58d8a693f68c1a48a 100644 --- a/castellum/contacts/forms.py +++ b/castellum/contacts/forms.py @@ -63,7 +63,7 @@ class AddressForm(forms.ModelForm): class ContactForm(forms.ModelForm): guardians_pane = forms.ChoiceField(required=False, choices=[ ('self', _('Full of age')), - ('guardians', _('Has legal guardian')), + ('guardians', _('Has legal representative')), ], widget=forms.RadioSelect) class Meta: @@ -155,7 +155,7 @@ class ContactForm(forms.ModelForm): age = datetime.date.today() - date_of_birth if not is_guardians_pane and age.days // 365 < settings.CASTELLUM_FULL_AGE: msg = _( - 'Subjects under the age of {} need a legal guardian.' + 'Subjects under the age of {} need a legal representative.' ).format(settings.CASTELLUM_FULL_AGE) raise ValidationError(msg, code='invalid') diff --git a/castellum/contacts/migrations/0010_alter_contact_guardians.py b/castellum/contacts/migrations/0010_alter_contact_guardians.py new file mode 100644 index 0000000000000000000000000000000000000000..a401b412ef5fa2dd55e842d3fe3b13dddf15883a --- /dev/null +++ b/castellum/contacts/migrations/0010_alter_contact_guardians.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.7 on 2021-09-14 14:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('contacts', '0009_phonetic_diacritics'), + ] + + operations = [ + migrations.AlterField( + model_name='contact', + name='guardians', + field=models.ManyToManyField(blank=True, related_name='guardian_of', to='contacts.Contact', verbose_name='Legal representatives'), + ), + ] diff --git a/castellum/contacts/models.py b/castellum/contacts/models.py index be67c65fc791e9c31e7debbf6b941f7f9e625786..08510e56e8efea6b6a10e3eccb80f7fd034def5d 100644 --- a/castellum/contacts/models.py +++ b/castellum/contacts/models.py @@ -158,7 +158,10 @@ class Contact(TimeStampedModel): ) guardians = models.ManyToManyField( - 'contacts.Contact', verbose_name=_('Guardians'), related_name='guardian_of', blank=True + 'contacts.Contact', + verbose_name=_('Legal representatives'), + related_name='guardian_of', + blank=True, ) objects = ContactQuerySet.as_manager() diff --git a/castellum/contacts/templates/contacts/__contact.html b/castellum/contacts/templates/contacts/__contact.html index 23fc2a0ffdfdab87dc430482cdbaf1c3c5ce1e02..4fc105afcdabf682cfbb365340ec850ec4999a29 100644 --- a/castellum/contacts/templates/contacts/__contact.html +++ b/castellum/contacts/templates/contacts/__contact.html @@ -29,7 +29,7 @@ {% include 'contacts/__contact_detail.html' with contact=guardian guardian=True %} {% else %}
-
{% translate 'Legal guardian' %}
+
{% translate 'Legal representative' %}
{% translate 'Insufficient privacy level' %}
{% endif %} diff --git a/castellum/contacts/templates/contacts/__contact_detail.html b/castellum/contacts/templates/contacts/__contact_detail.html index 5a0180aec2cb887f8acf21b08cb99802ac12d5f8..abc58013ab2dd2f75228414001fce78ea77292c1 100644 --- a/castellum/contacts/templates/contacts/__contact_detail.html +++ b/castellum/contacts/templates/contacts/__contact_detail.html @@ -4,11 +4,11 @@
{% if guardian %} -
{% translate 'Legal guardian' %}
+
{% translate 'Legal representative' %}
{{ contact.full_name }} {% if contact.guardian_of.count > 1 %} - {% icon 'users' label=_('This guardian has other wards who may also be suitable for this study.') %} + {% icon 'users' label=_('This person represents other subjects who may also be suitable for this study.') %} {% endif %}
{% endif %} diff --git a/castellum/contacts/templates/contacts/__guardian_item.html b/castellum/contacts/templates/contacts/__guardian_item.html index 82fbd160aa4063f5476f9079bad77e2d5e653d4c..9fafb83b61df8f0001919904ad1f2067c355c11e 100644 --- a/castellum/contacts/templates/contacts/__guardian_item.html +++ b/castellum/contacts/templates/contacts/__guardian_item.html @@ -2,7 +2,7 @@
-
{% translate 'Guardian' %}
+
{% translate 'Legal representative' %}
{% if name == 'guardians_remove' %} diff --git a/castellum/contacts/templates/contacts/contact_form.html b/castellum/contacts/templates/contacts/contact_form.html index d0856e847951b54c15a5e44a473a6ab32673fa8a..05946a89ea3749b09788f7b8cb823665556c074e 100644 --- a/castellum/contacts/templates/contacts/contact_form.html +++ b/castellum/contacts/templates/contacts/contact_form.html @@ -15,7 +15,7 @@ {% include 'utils/form_errors.html' with form=form %} {% if not object.is_complete %} - + {% endif %} {% csrf_token %} @@ -31,7 +31,7 @@
{% if form.guardians_blocked > 0 %}

- {% blocktranslate with count=form.guardians_blocked %}{{ count }} guardians not listed because of insufficient privacy level.{% endblocktranslate %} + {% blocktranslate with count=form.guardians_blocked %}{{ count }} legal representatives not listed because of insufficient privacy level.{% endblocktranslate %}

{% endif %} @@ -49,13 +49,13 @@ {% include 'contacts/__guardian_item.html' with name=form.guardians_add.name pk=subject.pk label=subject label=subject.contact.full_name removed=False %} {% endfor %} - + {% else %} {% has_perm 'subjects.view_subject' user as can_view_subject %} {% for subject_id, contact in form.guardians %}
-
{% translate 'Guardian' %}
+
{% translate 'Legal representative' %}
{{ contact }}
diff --git a/castellum/recruitment/templates/recruitment/contact.html b/castellum/recruitment/templates/recruitment/contact.html index d86d94ed9bd65421a62ff1be9ed035fde6d1f182..ba17cb07265905f18e4eb05b414b5e38c2888a2b 100644 --- a/castellum/recruitment/templates/recruitment/contact.html +++ b/castellum/recruitment/templates/recruitment/contact.html @@ -16,7 +16,7 @@ {% endif %} {% if subject.contact.has_guardian and study.geo_filter %} {% endif %} {% endif %} diff --git a/castellum/subjects/migrations/0023_subject_blocked.py b/castellum/subjects/migrations/0023_subject_blocked.py index 37b1c136f95b9069d464259c731c4ea8bab9e100..9cb3ab32eec8a2bb63fa588e075a3261edb40102 100644 --- a/castellum/subjects/migrations/0023_subject_blocked.py +++ b/castellum/subjects/migrations/0023_subject_blocked.py @@ -13,6 +13,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='subject', name='blocked', - field=models.BooleanField(default=False, help_text='The subject has been blocked due to inappropriate behaviour. They will neither be considered for recruitment, nor contacted as guardians. Blocking this subject does not automatically block their ward nor their co-guardians. They may thus still receive information about the recruitment process of their wards.', verbose_name='Subject is blocked'), + field=models.BooleanField(default=False, help_text='The person has been blocked due to inappropriate behaviour. They will neither be considered for recruitment, nor contacted as a legal representative. Blocking this person does not automatically block any represented subjects nor co-representatives. They may thus still receive information about the recruitment process.', verbose_name='Subject is blocked'), ), ] diff --git a/castellum/subjects/models.py b/castellum/subjects/models.py index 896dadfea72937bb9e317a5985ddb0efd5e22cf0..3456122752b59cd4079758deb7aa931b5a370538 100644 --- a/castellum/subjects/models.py +++ b/castellum/subjects/models.py @@ -87,11 +87,11 @@ class Subject(TimeStampedModel): deceased = models.BooleanField(_('Subject is deceased'), default=False) blocked = models.BooleanField(_('Subject is blocked'), default=False, help_text=_( - 'The subject has been blocked due to inappropriate behaviour. ' - 'They will neither be considered for recruitment, nor contacted as guardians. ' - 'Blocking this subject does not automatically block their ward nor their ' - 'co-guardians. They may thus still receive information about the recruitment ' - 'process of their wards.' + 'The person has been blocked due to inappropriate behaviour. ' + 'They will neither be considered for recruitment, nor contacted as a legal representative. ' + 'Blocking this person does not automatically block any represented subjects nor ' + 'co-representatives. They may thus still receive information about the recruitment ' + 'process.' )) source = models.CharField(_('Data source'), max_length=128, blank=True) diff --git a/castellum/subjects/templates/subjects/guardian_search.html b/castellum/subjects/templates/subjects/guardian_search.html index b0fb97e173cfcbc5fb5d05c9e29c89f29b38901f..e25f80aa39a322accb84d3857e0fafa12fb71c3c 100644 --- a/castellum/subjects/templates/subjects/guardian_search.html +++ b/castellum/subjects/templates/subjects/guardian_search.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n static bootstrap4 auth utils %} -{% block title %}{% translate "Guardians" %} · {{ block.super }}{% endblock %} +{% block title %}{% translate "Legal representatives" %} · {{ block.super }}{% endblock %} {% block content %}

{% translate 'Total number of subjects' %}: {{ count_total }}

@@ -81,9 +81,9 @@
{% if can_access %} - + {% else %} - + {% endif %}
diff --git a/castellum/subjects/templates/subjects/subject_confirm_delete.html b/castellum/subjects/templates/subjects/subject_confirm_delete.html index 6253ae391914b0ae9da84ae53d4cf03749eaa0c3..6dd4f2ec2c4377279f67d7d0832e6210e4226ca4 100644 --- a/castellum/subjects/templates/subjects/subject_confirm_delete.html +++ b/castellum/subjects/templates/subjects/subject_confirm_delete.html @@ -9,7 +9,7 @@ {% if is_last_guardian %}

- {% translate "This subject is the only guardian of another subject. Deletion means that this subject's ward becomes unreachable!" %} + {% translate "This person is the only legal representative of another subject. Deletion means that the subject represented by this person becomes unreachable!" %}

{% endif %} diff --git a/castellum/subjects/templates/subjects/subject_detail.html b/castellum/subjects/templates/subjects/subject_detail.html index a40e63df1638cd55c4f325d6c5de1e23b3b41014..a0321cefda8fb7315af93f8c558272386dae2b87 100644 --- a/castellum/subjects/templates/subjects/subject_detail.html +++ b/castellum/subjects/templates/subjects/subject_detail.html @@ -26,7 +26,7 @@ {% endif %} {% if subject.contact.guardian_of.exists %} -
{% translate 'Guardian of' %}
+
{% translate 'Legal representative of' %}
{% for c in subject.contact.guardian_of.all %} {% has_privacy_level c.subject.privacy_level user as can_access %} @@ -94,7 +94,7 @@
- {% translate 'Guardianship' %} + {% translate 'Legal representative' %} {% translate 'Art. 6 (1) lit. a, Art. 9 (2) lit. a GDPR and Art. 1626, 1902 BGB' %}
@@ -102,7 +102,7 @@ {{ subject.contact|display:'is_guardian' }} {% else %} {% url 'subjects:index' as url %} - {% blocktranslate with url=url %}If applicable, find or create a subject and set this one as their guardian.{% endblocktranslate %} + {% blocktranslate with url=url %}If applicable, find or create a subject and set this one as their legal representative.{% endblocktranslate %} {% endif %}
diff --git a/castellum/subjects/templates/subjects/subject_export.html b/castellum/subjects/templates/subjects/subject_export.html index f35e2a0b879c049f0b472eef6a4ac7cedb46070c..cc0088a154c12f10b5787952676a72a022602ee8 100644 --- a/castellum/subjects/templates/subjects/subject_export.html +++ b/castellum/subjects/templates/subjects/subject_export.html @@ -112,7 +112,7 @@
{{ subject.contact|verbose_name:'guardians' }}
{{ subject.contact|display:'guardians' }}
-
{% translate 'Guardian of' %}
+
{% translate 'Legal representative of' %}
{{ subject.contact|display:'guardian_of' }}
diff --git a/tests/contacts/forms/test_contact_form.py b/tests/contacts/forms/test_contact_form.py index f862023b788456ecd97837b86a512a745f719d21..403800c757d45aafe177e1fa9a0f2c72f9234780 100644 --- a/tests/contacts/forms/test_contact_form.py +++ b/tests/contacts/forms/test_contact_form.py @@ -284,7 +284,7 @@ def test_contact_form_with_guardians_remove(user, full_data, contact): @pytest.mark.django_db def test_contact_form_underage_without_guardian(user, full_data): - msg = 'Subjects under the age of 16 need a legal guardian.' + msg = 'Subjects under the age of 16 need a legal representative.' full_data.update({ 'date_of_birth': '{}-01-01'.format(datetime.date.today().year), })