{% extends view.base_template|default:"subjects/base.html" %} {% load static i18n auth recruitment django_bootstrap5 %} {% block title %} {% if object %} {% translate "Edit contact" %} {% else %} {% translate "Create new subject" %} {% endif %} · {{ block.super }} {% endblock %} {% block content %}
{% include 'utils/form_errors.html' with form=form %} {% if not object.is_complete %} {% endif %} {% csrf_token %} {% include 'contacts/__contact_form_top.html' with form=form %} {% include 'contacts/__contact_form_self.html' with form=form %} {% if form.legal_representatives_blocked > 0 %}

{% blocktranslate with count=form.legal_representatives_blocked %}{{ count }} legal representatives not listed because of insufficient privacy level.{% endblocktranslate %}

{% endif %}
{% has_perm 'subjects.change_subject' user as can_change_subject %} {% if can_change_subject %} {% for widget in form.legal_representatives_remove %} {% include 'contacts/__legal_representative_item.html' with name=form.legal_representatives_remove.name uuid=widget.data.value label=widget.choice_label legal_representative=widget.choice_label.subject removed=widget.data.selected %} {% endfor %} {% for subject in form.cleaned_data.legal_representatives_add %} {% include 'contacts/__legal_representative_item.html' with name=form.legal_representatives_add.name uuid=subject.uuid label=subject label=subject.contact.full_name removed=False %} {% endfor %} {% else %} {% has_perm 'subjects.view_subject' user as can_view_subject %} {% for subject_pk, contact in form.legal_representatives %}
{% translate 'Legal representative' %}
{{ contact }}
{% if view.context == 'subject_management' %} {% translate 'Details' %} {% elif view.context == 'recruitment' %} {% study_legal_representative_hash study contact.subject as hash %} {% translate 'Details' %} {% elif view.context == 'execution' %} {% study_legal_representative_hash study contact.subject as hash %} {% translate 'Details' %} {% endif %}
{% endfor %} {% endif %}
{% endblock %} {% block extra_scripts %} {% endblock %}