{% extends 'base.html.twig' %} {% block title %}{{ event.management.name }} - Live Racing{% endblock %} {% block body %} {% import 'play/live-racing/_wizard_leg_result.html.twig' as wlr %}

{{ event.management.name }}

{{ event.eventDate|date('l, F j, Y') }}

{% if event.videoUrl and not app.user.isOnHold %}
{% elseif not event.videoUrl and liveRacingBanners is not empty %}
{% if liveRacingBanners|length > 1 %} {% endif %}
{% for img in liveRacingBanners %}
Live Racing
{% endfor %}
{% if liveRacingBanners|length > 1 %} {% endif %}
{% if liveRacingBanners|length > 1 %}
{% for img in liveRacingBanners %} {% endfor %}
{% endif %}
{% endif %} {% if adsBanner %}
{% if adsBanner.linkUrl %} {% endif %} {{ adsBanner.title }} {% if adsBanner.linkUrl %} {% endif %}
{% endif %} {# Once every race on this event is closed/settled there is nothing left to bet on β€” hide the whole wizard and show a notice instead. The status poll below flips to this state live when the last open race closes. #}
🏁
Betting is closed

All races for this event are closed. See My Bets for your open tickets and results.

{% for i in 1..2 %}
{{ i }}
{% if i < 2 %}
{% endif %} {% endfor %}
{# The form carries the picker and amount fields together on one screen; only the active bet type's picker inputs stay enabled at submit time, so a form field name repeated across two different bet-type cards (e.g. two "horses[1][]" groups) never collides in the submitted payload. #}
{# ── Step 1: Pick Your Bet ── #}
Pick Your Bet
{# ── Bet type tabs (outer, one per betTypeKey - grouped since a multi-race key can have several combo instances sharing it, e.g. two separate Daily Double race pairs). Always a plain button: the actual event_bet_type_id radio lives one or two levels down, since a multi-combo key has no single id of its own to carry. #}
{% for key, group in groups %} {% endfor %}

No bet types are currently available for this event.

{# ── One panel per bet type key ── #} {% for key, group in groups %}
{# Combo tabs (nested) - only when this key has more than one instance (a multi-race key offered as several race-pair combos). Each is its own event_bet_type_id, so - unlike race tabs below - these ARE the real radio inputs. #} {% if group|length > 1 %}
{% for card in group %} {% endfor %}
{% endif %} {% for card in group %}
{% if group|length == 1 %} {# Only one instance of this key - its radio has no visible combo-tab bar, but still needs to exist. #} {% endif %} {% if card.betType.value == 'odd_even' %} {# Single-race, offered on >1 race: race tabs pick which one (exclusive). #} {% if card.legs|length > 1 %}
{% for leg in card.legs %} {% endfor %}
{% endif %}
{% for leg in card.legs %}
{% if leg.result %} {{ wlr.leg_result(leg, raceResults[leg.race.id]|default(null)) }} {% else %}
{% endif %}
{% endfor %}
{% elseif card.betType.kind == 'single' %} {% if card.legs|length > 1 %}
{% for leg in card.legs %} {% endfor %}
{% endif %}
{% for leg in card.legs %}
{% if leg.result %} {{ wlr.leg_result(leg, raceResults[leg.race.id]|default(null)) }} {% else %}
{% for horse in leg.horses %}
{{ horse.horseNumber }} {{ horse.horseName }}{% if horse.scratched %} Scratched{% endif %}
{{ horse.horseNumber }}
{{ horse.horseName }}{% if horse.scratched %} Scratched{% endif %} J: {{ horse.horseJockey }} {% if horse.horseTrainer %}T: {{ horse.horseTrainer }}{% endif %}
{% for position in 1..card.betType.pickCount %} {% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% else %} {# Multi-race: a leg tab per race in the combo - navigation only (every leg still needs its own pick simultaneously, so switching tabs never disables/clears a sibling leg's inputs, unlike the single-kind race tabs above). #}
{% for leg in card.legs %} {% endfor %}
{% for leg in card.legs %}
{% if leg.result %} {{ wlr.leg_result(leg, raceResults[leg.race.id]|default(null)) }} {% else %}
{% for horse in leg.horses %}
{{ horse.horseNumber }} {{ horse.horseName }}{% if horse.scratched %} Scratched{% endif %}
{{ horse.horseNumber }}
{{ horse.horseName }}{% if horse.scratched %} Scratched{% endif %} J: {{ horse.horseJockey }} {% if horse.horseTrainer %}T: {{ horse.horseTrainer }}{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
⚠ Betting is now closed for this race. Please pick another race or bet type.
{# ── Place Bet: summary + amount, right below the picker on the same screen ── #}
Place Bet
Race
Bet Type
Selection(s)
Combos
Cost Per Ticket
Minimum Bet
Bet Amount (β‚±)
Tickets
Total: β‚±0.00
{# ── Step 2: Done ── #}
βœ“
Bet Placed!

{# Wallet Bar #}

Balance

β‚±{{ app.user.walletBalance|number_format(2) }}

+ Add Funds
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}