# Features — myPass-registration

Evidence date: 2026-10-09. Source: `master` at `e1a887a` (2023-01-18).

Status words mean:

- **Active** — reachable from `index.html` through `scripts/core.js`.
- **Unused** — file or branch of code is in the tree and the registration page does not load it.
- **Removed on the page** — markup or check was taken out; a remnant may still be posted.

## Current features

### F-01 — Public registration page

Active.

`index.html` is a four-step form titled MyPass: Personal, Identity, Events, Submit. Tabs are not clickable (`pointer-events: none`). Movement is the NEXT / PREVIOUS controls. Two copies of the tab bar and event title are kept in sync (`#staticReg*` and `#dynReg*`).

Evidence: `index.html` lines for `#tab-1` through `#tab-4`, `scripts/core.js` `setTabActive`.

### F-02 — Hostname event selection

Active.

First hostname label is posted to `getstyling`. Returned `eventID` drives `getevent`. Failure or a body without `eventID` uses `domains.demo` (event `87`).

Evidence: `scripts/core.js` `DOMContentLoaded`, `domains.js` key `demo`. Commit `4546bef` ("default to demo style when domain not found").

### F-03 — Event branding

Active.

Accreditation name, title, banner (`DATA.AccreBanner`), background image (`DATA.MypassBackground`), and optional styling colours, highlight, and favicon.

Evidence: `doPageLoad`, styling field map in `core.js`. Favicon-from-API commits `535052b`, `3930fee`.

### F-04 — Personal details step

Active.

Name, surname, ID or passport, nationality, date of birth, gender (Male / Female / Prefer not to say), ethnicity, calling code, mobile, email, address, city, country, postal code. Address line 2 may be empty. Address and city blocks follow `RegistrationFields` from the event.

Evidence: `index.html` `#tab-1`, `checkDivInputs`, `doPageLoad` display assignments. City/address API commit `625aad6`.

### F-05 — South African ethnicity question

Active.

Four options, default African Black. Row is enabled for nationality `South Africa` only. The value is still posted when the row is hidden.

Evidence: `onNationality`, `#ethnicity`. Default-ethnicity commit `85bc3af`. Custom-field display commit `4aef951`.

### F-06 — Pass name

Active.

First name replaces Pass Name. Surname appends onto it. The applicant can edit Pass Name afterwards.

Evidence: `nameToPass`, `surnameToPass`, `#passName`.

### F-07 — Organisation reference lookup

Active when `RequireOrganisationReference` is not `"0"`.

Uppercased reference, auto-search at length 6, manual search otherwise. Fills trading name. Limit reached replaces the form.

Evidence: `searchOrg`, `orgCodeSearch`, `showLimitReached`, `#response_event_full`.

### F-08 — Free-typed organisation name

Active when `RequireOrganisationReference` is `"0"`.

Reference row hidden. Organisation name enabled.

Evidence: `doPageLoad` branch on `DATA.RequireOrganisationReference`.

### F-09 — Category and role

Active.

Options come from `Cats` and `Roles` on the event. Changing category filters roles. Role description is required. Help text is static in the page.

Evidence: `roleSelect`, `#roleCategory`, `#roleFunction`, `#roleDescription`.

### F-10 — Photo upload and crop

Active.

Image file, preview, Cropme edit (zoom, rotate, 250×280 viewport), crop result kept as a data URL and posted as `profileImage`. The file input's path string is also posted as `fileUpload`.

Evidence: `readFile`, `editImage`, `cropImage`, `plugins/cropme/`. Photo commits `691dc53`, `74fd068`, `327119c`.

### F-11 — Linked events

Active when `MediaEvent` is not `"0"`.

One checkbox per linked accreditation (`LID`, label `Acc_Secondary`). At least one required. Ids posted as `eventsLinked`.

Evidence: `doPageLoad` `Linked` loop, `oncheckEventSubmit`.

### F-12 — Terms acceptance

Active.

Modal `#menu-call` shows `DATA.TermsAndConditions`. Checkbox gates SUBMIT.

Evidence: `index.html` `#tandcCheck`, `oncheckSubmit`.

### F-13 — Submit and reference

Active.

Posts the application JSON. Success panel shows `{EVENTNAME} Team`, `REF: {REFNUMBER}`, and the fixed address `info@mypass.zone`. Close reloads the page.

Evidence: `submitRegistration`, `#response`. Email commit `336e6cb`, `d47fe49`.

### F-14 — Closed registration

Active.

If `CloseDate` is today or earlier in local time, details hide and the closed sentence is shown.

Evidence: `dateInPast` in `doPageLoad`. Commit `1a73026`.

### F-15 — Service worker

Active.

Registers `/_service-worker.js`, cache name `Cache-Version-v1.309`, precaches `index.html`, cache-first fetch.

Evidence: `scripts/custom.js` `isPWA = true`, `_service-worker.js`. Cache commits `a804ea5`, `d857f20`, `bda10d4`.

### F-16 — Production static deploy

Active in the pipeline file for branch `master`.

S3 upload of the clone directory, then CloudFront invalidation. Target names are deployment variables.

Evidence: `bitbucket-pipelines.yml`.

### F-17 — Visual field hints

Active as icons only.

Theme validators in `custom.js` mark email, name, and select fields valid or invalid. They do not block NEXT or SUBMIT. Mobile length above 7 shows a tick in `validateMobileNumber`.

Evidence: `scripts/custom.js` validator block, `validateMobileNumber`.

## Removed or inactive

### F-18 — Covid declaration

Removed on the page. Remnant still posted.

The checkbox and its label are inside an HTML comment. `AccreditationNote` is no longer copied into a label. Submit sets `covidCheck` to `1` and does not read a checkbox.

Evidence: `index.html` comment around `#covidCheck`; `submitRegistration`. Commits on 2023-01-18: `016eca9` removed the check, `2f981ef` restored it, `1c39a5d` removed it again.

### F-19 — Phone number on the identity step

Removed on the page.

The input is commented out. The payload line is commented out.

Evidence: `index.html` comment around `#phone`, `submitRegistration`.

### F-20 — QA API host

Inactive.

`qa` is an empty string, so calls use `https://footprintapp.net`. Commit `3d778f4` ("remove qa domain").

### F-21 — Debug subdomain

Inactive.

`debug = false`. Commit `d8e47de`. The `true` path would send domain `cpt7smedia`.

### F-22 — Per-domain table in `domains.js`

Unused except `demo`.

Keys `default_old`, `sarugby`, `9hour`, `local`, `rwcsevens`, `formulae`, `rwcsevensmedia` are never selected. Their `form.message.role` text is not shown.

Evidence: only `domains.demo` is referenced (`scripts/core.js`).

### F-23 — Earlier MyPass client

Unused.

`scripts/core_old.js` and `scripts/core_epic.js` call Footprint for login, password, profile, events per user, pass details, upcoming tests, results, and health certificate (`getlogin`, `postpwd`, `getpwdreset`, `postuserprofile`, `geteventsperuser`, `getmypassdetails`, `getupcomingtest`, `getresults`, `gethealthcertificatevaccine`, plus the registration calls). `index.html` does not load these files.

`exports/` holds matching design HTML (sign-in, sign-up, onboarding, health pass, home). Not linked.

### F-24 — Theme contact mailer

Unused.

`php/contact.php` mails `mail@domain.com`. No form in `index.html` posts to it.

### F-25 — Add-to-home install banners

Inactive on this page.

`custom.js` looks for install-menu elements that `index.html` does not contain. Service worker registration still runs.

### F-26 — PWA install menus and theme menus

Unused files: `menu-main.html`, `menu-colors.html`, `menu-footer.html`, `menu-share.html`, `screen_result_review_old.html`.

## Version markers (not features)

These numbers disagree. None of them is read as a runtime feature flag.

| Marker | Value |
|---|---|
| `index.html` script | `scripts/core.js?v1.307` |
| `index.html` theme script | `scripts/custom.js?v1.000` |
| `index.html` stylesheet | `styles/style.css?v1.002` |
| Service worker cache | `Cache-Version-v1.309` |
| Commit message `28c48e5` | "Changed version to 1.308" |

`load_js` in `index.html` would load `custom.js` twice and never load the second script it creates. Nothing calls `load_js`. The live tags are the three script tags at the bottom of the page (`bootstrap.min.js`, `custom.js`, `domains.js`, `core.js`).

## Planned

No planned-feature list, ticket, or TODO file is in the repository. Planned work is **Unknown / Requires Confirmation**.

## Recently changed

Last behaviour change on `master` is 2023-01-18:

- Covid checkbox removed from the last step (`1c39a5d`).
- `covidCheck` forced to `1` in the same period (`016eca9` comment in `submitRegistration` matches the current source).
- Page-load script touched (`e1a887a`).
- A version string touched (`28c48e5`).

Nothing on `master` is newer than that date.
