Skip to content

Submission-channel checkboxes on the Settings page #1607

Description

@ArendPeter

Parent

Part of #1603.

What to build

On the election Settings admin page, the owner picks which ballot submission channels are allowed for the election via a checkbox group: Online (browser), Paper ballots (admin upload), and (behind a feature flag) Discord. This is the UI for the allowed_submit_types setting added in #1604.

Acceptance criteria

  • One allowed_submit_types control on the Settings page, styled as a FormGroup of three checkboxes — not three independent toggles, since they share one array-valued setting: "Online (browser)", "Paper ballots (admin upload)", "Discord".
  • Each checkbox's checked state reads (election.settings.allowed_submit_types ?? DEFAULT_ALLOWED_SUBMIT_TYPES).includes(<that type>); toggling one writes the full updated array back.
  • The whole group is editable only while the election is in draft, matching the existing pattern used by every other election-settings toggle.
  • "Paper ballots (admin upload)" is unchecked by default (inherited from the DEFAULT_ALLOWED_SUBMIT_TYPES default in Enforce allowed_submit_types in the ballot-submission pipeline #1604 — no separate default logic needed here).
  • The last remaining checked box is disabled client-side so it can't be unchecked (the server-side empty-array rejection from Enforce allowed_submit_types in the ballot-submission pipeline #1604 is the backstop, not the primary UX).
  • The Discord row is hidden entirely behind a new feature flag, following the existing pattern used for the precinct-grouping feature flag. Discord stays policy-allowed by default in the underlying array regardless of the flag.
  • Manual/E2E check: toggling "Paper ballots (admin upload)" on in draft, saving, and confirming the setting persists and round-trips through the Settings page.

Blocked by

#1604 (needs the allowed_submit_types field, default, and validation to exist).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions