Replace bare <a href=/qr> Pay/Pay-All links with <button type="button" class="pay-btn" data-*> elements on /adults and /juniors
Add #qrModal markup to both templates; toggled via .active class (same convention as #memberModal from M6.5)
New payment-qr.js IIFE module: event-delegated click on .pay-btn, builds SPD message (Name: MM/YYYY), sets #qrImg.src to /qr?…, opens modal; Esc closes it; coexists with member-detail.js
Add #qrModal { display:none; } + .active { display:flex; } CSS rules (content rules were already present from M6.1)
Remove dead qrHref/qrHrefAll template helpers from render.go
Markup tests in html_handler_test.go: assert modal IDs, script tag, data-bank-account, no bare href=/qr
Test plan
make go-build go-test go-lint — all green ✅
Browser on :8080/adults: click Pay → #qrModal opens with title, account, amount, message, QR image; tab stays on /adults
Click Pay All → modal shows +-joined MM/YYYY+MM/YYYY message
Outside-click and [close] and Esc close the modal
/juniors same checks; member-detail [i] modal still works alongside
Scan QR with Czech banking app — SPD*1.0*ACC:… payload correct
## Summary
- Replace bare `<a href=/qr>` Pay/Pay-All links with `<button type="button" class="pay-btn" data-*>` elements on `/adults` and `/juniors`
- Add `#qrModal` markup to both templates; toggled via `.active` class (same convention as `#memberModal` from M6.5)
- New `payment-qr.js` IIFE module: event-delegated click on `.pay-btn`, builds SPD message (`Name: MM/YYYY`), sets `#qrImg.src` to `/qr?…`, opens modal; Esc closes it; coexists with `member-detail.js`
- Add `#qrModal { display:none; }` + `.active { display:flex; }` CSS rules (content rules were already present from M6.1)
- Remove dead `qrHref`/`qrHrefAll` template helpers from `render.go`
- Markup tests in `html_handler_test.go`: assert modal IDs, script tag, `data-bank-account`, no bare `href=/qr`
## Test plan
- [ ] `make go-build go-test go-lint` — all green ✅
- [ ] Browser on `:8080/adults`: click Pay → `#qrModal` opens with title, account, amount, message, QR image; tab stays on `/adults`
- [ ] Click `Pay All` → modal shows `+`-joined `MM/YYYY+MM/YYYY` message
- [ ] Outside-click and `[close]` and Esc close the modal
- [ ] `/juniors` same checks; member-detail `[i]` modal still works alongside
- [ ] Scan QR with Czech banking app — `SPD*1.0*ACC:…` payload correct
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace bare <a href=/qr> Pay buttons with <button data-*> elements that
open an in-page #qrModal (matching Python's showPayQR UX), driven by a
new payment-qr.js vanilla-JS IIFE module. Remove the now-dead qrHref /
qrHrefAll template helpers from render.go.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr
merged commit 4276d7b915 into main2026-05-08 14:54:24 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
<a href=/qr>Pay/Pay-All links with<button type="button" class="pay-btn" data-*>elements on/adultsand/juniors#qrModalmarkup to both templates; toggled via.activeclass (same convention as#memberModalfrom M6.5)payment-qr.jsIIFE module: event-delegated click on.pay-btn, builds SPD message (Name: MM/YYYY), sets#qrImg.srcto/qr?…, opens modal; Esc closes it; coexists withmember-detail.js#qrModal { display:none; }+.active { display:flex; }CSS rules (content rules were already present from M6.1)qrHref/qrHrefAlltemplate helpers fromrender.gohtml_handler_test.go: assert modal IDs, script tag,data-bank-account, no barehref=/qrTest plan
make go-build go-test go-lint— all green ✅:8080/adults: click Pay →#qrModalopens with title, account, amount, message, QR image; tab stays on/adultsPay All→ modal shows+-joinedMM/YYYY+MM/YYYYmessage[close]and Esc close the modal/juniorssame checks; member-detail[i]modal still works alongsideSPD*1.0*ACC:…payload correct🤖 Generated with Claude Code
- GET /qr: Czech QR Platba PNG; ports Python qr_code() exactly (account validation, amount clamping, * stripping, SPD format) - GET /sync-bank: Fio sync → infer → cache flush with captured log - GET+POST /flush-cache: form + action, shows deleted count - GET /version: JSON alias of /api/version (Python parity) - FlushCache() added to membership.Sources; wired through api.Handler - web.ActionHandlers{BankSync} closure-based dep injection for sync - New dep: github.com/skip2/go-qrcode - TestQRBuildSPD (9 cases), TestServeQR, TestServeFlushCache{GET,POST}, TestServeSync, TestServeVersion added Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>