{% extends "base.html" %} {% load crispy_forms_tags %} {% block title %}My Profile{% endblock %} {% block nav_profile %}active{% endblock %} {% block content %}
{% if user.profile_photo %} Profile Photo {% else %}
{{ user.first_name|first|upper }}{{ user.last_name|first|upper }}
{% endif %}
{{ user.get_full_name }}

{{ user.email }}

{% if user.enrollment %} {{ user.enrollment.student_number }} {% endif %}
{% if application %}
{% if edits_unlocked %}

Editing is enabled. You can update your contact details and documents below.

{% else %}

Your contact details and documents are locked. Ask the administrator to enable editing if you need to make changes.

{% endif %}
{% endif %}
Edit Profile
{% csrf_token %} {% crispy form %}
{% if application %}
Personal Information
Full Name
{{ application.full_name }}
Date of Birth
{{ application.date_of_birth|date:"d M Y" }}
Gender
{{ application.get_gender_display }}
Nationality
{{ application.nationality }}
{% if application.national_id %}
National ID / Passport
{{ application.national_id }}
{% endif %}
Email
{{ application.email }}

These identity details are managed by the administration. Contact them if a correction is needed.

Academic Background
Highest Level
{{ application.get_highest_education_level_display }}
Year Completed
{{ application.year_of_completion }}
Last School Attended
{{ application.last_school_attended }}
Contact Details
{% if not edits_unlocked %}Locked{% endif %}
{% if edits_unlocked %}
{% csrf_token %} {% crispy contact_form %}
{% else %}
Phone
{{ application.phone_number|default:"—" }}
Address
{{ application.physical_address|default:"—" }}
District
{{ application.district|default:"—" }}
Next of Kin
{{ application.emergency_contact_name|default:"—" }} ({{ application.get_emergency_contact_relationship_display }})
Next of Kin Phone
{{ application.emergency_contact_phone|default:"—" }}
{% endif %}
My Documents
{% if not edits_unlocked %}Locked{% endif %}
{% if edits_unlocked %}

Upload missing documents or replace existing ones. PDF, JPG or PNG — max 5 MB.

{% endif %}
{% for d in documents %}
{{ d.label }} {% if d.doc %} — {{ d.doc.filename }} {% else %} — Not uploaded {% endif %}
{% if edits_unlocked %}
{% csrf_token %}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}