{% extends "base.html" %} {% load i18n static django_bootstrap5 auth utils %} {% block title %}{% translate "Legal representatives" %} · {{ block.super }}{% endblock %} {% block content %}

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

{% include 'utils/form_errors.html' with form=form %} {% csrf_token %} {% bootstrap_field form.search %}
{% if form.is_valid %}
{% has_perm 'subjects.change_subject' user as can_change_subject %} {% if can_change_subject %}
{% endif %}
    {% for subject in matches %} {% with contact=subject.contact %} {% has_privacy_level subject.privacy_level user as can_access %}
  • {% if can_access %} {% endif %}
    {% if can_access %}
    {% if contact.title %}{{ contact.title }}{% endif %} {% if contact.first_name|lower == form.cleaned_data.first_name|lower %} {{ contact.first_name }} {% else %} {{ contact.first_name }} {% endif %} {% if contact.last_name|lower == form.cleaned_data.last_name|lower %} {{ contact.last_name }} {% else %} {{ contact.last_name }} {% endif %}
    {% if contact.date_of_birth %}
    {{ contact.date_of_birth }}
    {% endif %} {% if contact.email %}
    {% if contact.email|lower == form.cleaned_data.email|lower %} {{ contact.email }} {% else %} {{ contact.email }} {% endif %}
    {% endif %}
    {% if subject.blocked %} {{ subject|verbose_name:'blocked' }} {% endif %} {% else %}

    {{ contact.full_name }}

    {% translate 'insufficient privacy level' %}
    {% endif %}
    {% if can_access %} {% else %} {% endif %}
  • {% endwith %} {% empty %}
  • {% translate 'No matches found' %}
  • {% endfor %}
{% if can_change_subject %}
{% for error in privacy_level_form.non_field_errors %} {% endfor %} {% for error in contact_form.non_field_errors %} {% endfor %} {% csrf_token %} {% include 'contacts/__contact_form_top.html' with form=contact_form %} {% bootstrap_field privacy_level_form.privacy_level %} {% include 'contacts/__contact_form_self.html' with form=contact_form %} {{ form.search.as_hidden }}
{% endif %}
{% endif %} {% endblock %} {% block extra_scripts %} {% endblock %}