--- phase: 01-registration-form-update plan: 01 subsystem: registration tags: [php, smarty, mysql, registration, admin] requires: [] provides: - Updated XXXV Konferencja registration form - Participant persistence for new registration fields - Admin visibility for new registration fields - SQL and PHP database migration affects: [registration, admin-panel, email-summary] tech-stack: added: [] patterns: [legacy PHP/Smarty form extension, idempotent PHP migration runner] key-files: created: - _rejestracja/sql/2026-04-24-registration-form-update.sql - _rejestracja/sql/apply-2026-04-24-registration-form-update.php modified: - _rejestracja/controller/IndexController.php - _rejestracja/core/model/MfParticipant.class.php - _rejestracja/core/_model/MfParticipant.class.php - _rejestracja/template/partial/Index/Index.tpl - _rejestracja/template/partial/Index/IndexSent.tpl - _rejestracja/Admin/controller/CalcController.php - _rejestracja/Admin/template/partial/Calc/Reg.tpl - _rejestracja/Admin/template/partial/Calc/RegEdit.tpl key-decisions: - "Runtime model lives in core/model; mirrored updates into core/_model for plan consistency." - "Removed two-day and three-day visible participation options after user/client clarification." - "Replaced free-text days input with explicit day-choice radios." patterns-established: - "Use technical values in DB, map them to Polish labels in mail/admin templates." duration: same-session started: 2026-04-24T15:20:00+02:00 completed: 2026-04-24T16:00:00+02:00 --- # Phase 1 Plan 01: Registration Form Update Summary Updated the Aktualia registration flow so the public form, database persistence, confirmation email, and admin panel support the client-requested XXXV Konferencja fields. ## Performance | Metric | Value | |--------|-------| | Duration | Same session | | Started | 2026-04-24 | | Completed | 2026-04-24 | | Tasks | 3 completed | | Files modified | 8 modified, 2 created | ## Acceptance Criteria Results | Criterion | Status | Notes | |-----------|--------|-------| | AC-1: Public Form Matches DOCX | Pass | Form includes invoice data, talk/poster data, consents, 2026 fee timing, full conference, one-day with lodging, one-day without lodging, fixed day choices, surcharges, diet preference, and price display. Two-day/three-day options were removed after clarification. | | AC-2: Submitted Values Are Persisted | Pass | New fields are mapped in `MfParticipant`, assigned in `IndexController`, and covered by SQL/PHP migration. | | AC-3: Pricing And Day Options Are Correct | Pass with caveat | Visible one-day/full options calculate as before; final validation still depends on live/staging submission after DB migration. | | AC-4: Admin Panel Shows New Registration Data | Pass | Admin list/detail show participation type, days, diet, room surcharge, accompanying person/kierowca; `RegEditAction` supports payment status update. | | AC-5: Confirmation Output Includes New Data | Pass | Confirmation/email summary includes participation labels, selected days, surcharges, diet, and final price. Technical values are mapped to Polish labels. | ## Accomplishments - Added persistence for participation option, selected days, lodging flag, diet/special diet, single-room surcharge, and accompanying person/kierowca. - Replaced legacy free-text day input with explicit date choices from the client document. - Added an idempotent PHP migration runner for server-side database updates. - Updated admin views so the newly collected data is visible and registration details are reachable through `edytuj`. ## Files Created/Modified | File | Change | Purpose | |------|--------|---------| | `_rejestracja/sql/2026-04-24-registration-form-update.sql` | Created | Add new `mf_participant` columns. | | `_rejestracja/sql/apply-2026-04-24-registration-form-update.php` | Created | Idempotent server-side migration runner. | | `_rejestracja/core/model/MfParticipant.class.php` | Modified | Runtime model fields, getters, setters, DB mappings. | | `_rejestracja/core/_model/MfParticipant.class.php` | Modified | Mirrored model fields for generated/model copy. | | `_rejestracja/controller/IndexController.php` | Modified | Save new POST values and derive canonical participation option/days. | | `_rejestracja/template/partial/Index/Index.tpl` | Modified | Public form fields, day radios, diet fields, 2026 payment date, removed obsolete options. | | `_rejestracja/template/partial/Index/IndexSent.tpl` | Modified | Mail/confirmation output for new fields with Polish labels. | | `_rejestracja/Admin/controller/CalcController.php` | Modified | Added `RegEditAction` and payment status update handling. | | `_rejestracja/Admin/template/partial/Calc/Reg.tpl` | Modified | Admin list shows new registration fields and edit link. | | `_rejestracja/Admin/template/partial/Calc/RegEdit.tpl` | Modified | Admin detail shows new registration fields. | ## Verification Results | Check | Status | |-------|--------| | `php -l _rejestracja/core/model/MfParticipant.class.php` | Pass | | `php -l _rejestracja/core/_model/MfParticipant.class.php` | Pass | | `php -l _rejestracja/controller/IndexController.php` | Pass | | `php -l _rejestracja/Admin/controller/CalcController.php` | Pass | | `php -l _rejestracja/sql/apply-2026-04-24-registration-form-update.php` | Pass | | Search for removed options in active form | Pass | ## Decisions Made | Decision | Rationale | Impact | |----------|-----------|--------| | Keep canonical DB values like `one_day_no_lodging`, but map them in templates | Stable storage, readable user/admin output | Mail/admin show Polish labels instead of technical strings. | | Remove visible two-day and three-day options | User clarified these are not wanted from the document | Active form only exposes full conference and one-day variants. | | Replace text day input with radios | User clarified fixed choices should replace free text | Stored value comes from `participation_days`. | | Add PHP migration runner | User requested DB migration via PHP script | Migration can be run by URL/CLI and skips existing columns. | ## Deviations from Plan | Type | Count | Impact | |------|-------|--------| | Scope correction | 2 | Removed two-day/three-day options and old text day field based on user clarification. | | Runtime discovery | 1 | Updated `core/model` as actual autoload target, mirrored `_model`. | | Tooling addition | 1 | Added PHP migration runner in addition to SQL file. | ## Issues Encountered | Issue | Resolution | |-------|------------| | Legacy encoding/mojibake in templates | Corrected newly added Polish labels to UTF-8 and avoided broad edits to older unrelated text. | | Technical participation value appeared in mail | Added template mapping to Polish display labels. | | Not a git repository | No phase commit could be created; documented as environment limitation. | ## Next Phase Readiness **Ready:** - Form, persistence, confirmation output, admin display, SQL migration, and PHP migration runner are implemented. **Concerns:** - Live/staging database must run the migration before new submissions can persist new columns. - This legacy codebase has duplicate model directories; keep `core/model` and `core/_model` aligned for participant changes. **Blockers:** - None for this requested change after migration is applied. --- *Phase: 01-registration-form-update, Plan: 01* *Completed: 2026-04-24*