{% extends "subjects/subject_base.html" %} {% load i18n auth subjects utils %} {% block title %}{% translate "Delete subject" %} · {{ block.super }}{% endblock %} {% block content %}
{% csrf_token %} {% if is_last_legal_representative %}

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

{% endif %} {% if has_participations %}

{% translate "This subject cannot be deleted because there still is data about them in studies." %}

{% elif has_pseudonym_in_general_domain %}

{% translate "This subject may still have data in general domains." %}

{% else %}

{% translate "This subject does not have any data in studies that would block deletion." %}

{% endif %} {% if has_participations or has_pseudonym_in_general_domain %}
{% if has_participations %}

{% translate "Please delete all of these study participations:" %}

{% endif %}
    {% for participation in object.participation_set.all %} {% has_perm 'studies.view_study' user participation.study as can_view_study %}
  • {{ participation.study }}
    {{ participation.study.contact_person }} {{ participation|display:'status' }} {% if participation.study.status == participation.study.FINISHED and not participation.study.domains.exists %} {% translate 'Pseudonyms deleted' %} {% endif %}
    {% if participation.status in participation.INVITED_SET %} {% translate 'Pseudonyms' %} {% translate 'Mail to study' %} {% endif %} {% if can_view_study %} {% translate 'Study details' %} {% endif %} {% translate 'Delete' %}
  • {% endfor %} {% if has_pseudonym_in_general_domain %}
  • {% translate "General pseudonym domains" %}
  • {% endif %}
{% endif %}

{% translate "Are you sure you want to permanently delete this subject and all related data?" %}

{% if not has_participations and has_pseudonym_in_general_domain %} {% endif %}
{% translate 'Cancel' %}
{% endblock %}