Skip to content

Hide Vote button and show banner when browser voting is disabled #1608

Description

@ArendPeter

Parent

Part of #1603.

What to build

When online (browser) voting isn't an allowed submission channel for an election, voters see a clear banner in place of being able to cast a ballot, and the "Vote" button is hidden from the election's home page — the same treatment already used for draft/archived elections.

Acceptance criteria

  • The election home page hides the "Vote" button when submitted_via_browser isn't in the resolved allowed_submit_types (election.settings.allowed_submit_types ?? DEFAULT_ALLOWED_SUBMIT_TYPES) — same treatment as an archived election.
  • The vote page shows a banner ("Online voting is not enabled for this election. Please contact the election administrator.") in that case, styled and placed like the existing draft/archived banners (alongside the ballot, not replacing the page).
  • Test coverage (unit or E2E) for both the hidden-button and banner states, driven by setting allowed_submit_types to exclude submitted_via_browser on a fixture/test election.

Blocked by

#1604 (needs the allowed_submit_types field and default 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

    Labels

    SandcastleIssues to be implemented by the Sandcastle agent toolTrack Via Parent

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions