{% extends "base.html" %} {% import "_fields.html" as fm %} {% block main %} {% if p %} {% include "_person_head.html" %} {% else %}
People

New person

{% endif %}
{% if mode == "new" %}

Read the passport

Type or paste the two lines at the bottom of the photo page and press Read, or take a photo of the page. The form below fills itself in, and the check digits in the lines catch typing errors.

{{ fm.area("mrz", "Machine-readable zone, two lines of 44 characters", pf.mrz, err=errors.mrz, rows=2, cls="mrz") }}
{% include "_mrz_photo.html" %} {% if mrz_note %}

{{ mrz_note }}

{% endif %}
{% endif %}

{% if mode == "new" %}Person{% else %}Personal details{% endif %}

{{ fm.text("surname", "Surname", f.surname, err=errors.surname, req=true, hint="As printed in the passport.") }} {{ fm.text("first_name", "First name", f.first_name, err=errors.first_name, req=true) }} {{ fm.text("middle_name", "Middle names", f.middle_name, err=errors.middle_name) }} {{ fm.select("title", "Title", f.title, titles, err=errors.title) }} {{ fm.select("sex", "Sex", f.sex, sexes, err=errors.sex) }} {{ fm.text("date_of_birth", "Date of birth", f.date_of_birth, err=errors.date_of_birth, type="date") }} {{ fm.text("place_of_birth", "Place of birth", f.place_of_birth, err=errors.place_of_birth) }} {{ fm.select("nationality", "Nationality", f.nationality, countries, err=errors.nationality) }} {{ fm.text("occupation", "Occupation", f.occupation, err=errors.occupation) }} {{ fm.select("employer", "Employer", f.employer, companies, err=errors.employer, blank="Not employed", hint="The company named in the work permit. Companies are kept under Companies.") }} {{ fm.text("phone", "Phone", f.phone, err=errors.phone, type="tel") }} {{ fm.text("email", "Email", f.email, err=errors.email, type="email") }} {{ fm.area("notes", "Notes", f.notes, err=errors.notes, rows=3, fcls="wide") }}
{% if mode == "new" %}

Passport

Optional here; it can also be added later.
{{ fm.text("number", "Passport number", pf.number, err=errors.number) }} {{ fm.select("issuing_country", "Issued by", pf.issuing_country, countries, err=errors.issuing_country, blank="Choose a country") }} {{ fm.text("issued_on", "Date of issue", pf.issued_on, err=errors.issued_on, type="date") }} {{ fm.text("expires_on", "Date of expiry", pf.expires_on, err=errors.expires_on, type="date") }} {{ fm.text("issued_at", "Authority or place of issue", pf.issued_at, err=errors.issued_at, hint="As printed in the passport.", cls="wide") }}
{% endif %}
Cancel
{% endblock %}