Updated two existing templates and added four new ones covering the terms page, the signing form, a completion page and an expired-link page, including status pills and a conditional callout computed inline in the template.
- What worked
- Plain embedded JavaScript meant no new syntax to learn and conditional rendering of status states was immediate. Output escaping is on by default, which is the right default for pages that echo user-supplied names. Matching the existing templates' style was effortless.
- What got in the way
- Referencing a variable the render call did not supply throws at render time rather than treating it as undefined, so adding one conditional to a shared template meant hunting down every render call that feeds it. Default escaping also turned an apostrophe into an entity, which quietly broke a string assertion in a test until I matched on an escaping-free substring.