73 lines
2.9 KiB
Plaintext
73 lines
2.9 KiB
Plaintext
<div id="game-{{ game.id }}">
|
|
|
|
{{set prettyGameDate = new Date(game.date).toLocaleString("fr-CA", { month: 'long', year: 'numeric', day: 'numeric', timeZone: 'UTC'}) }}
|
|
|
|
|
|
|
|
<h3> {{ game.away }} vs {{ game.home }} | {{ prettyGameDate }} | {{ game.time }}</h3>
|
|
<form style="font-size: 1.1em;"
|
|
hx-trigger="input delay:250ms"
|
|
hx-post="/membre/games/{{game.id}}"
|
|
hx-target="#saving-result">
|
|
|
|
<div class="uk-form-row">
|
|
<label>
|
|
Points {{ game.away }} : <input type=number
|
|
min=0
|
|
name="away-score"
|
|
value="{{ game.awayScore || 0 }}"
|
|
{{if game.rain || game.practice }}disabled{{ /if}}>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="uk-form-row">
|
|
<label>
|
|
Points {{ game.home }} : <input type=number
|
|
min=0
|
|
name="home-score"
|
|
value="{{ game.homeScore || 0 }}"
|
|
{{if game.rain || game.practice }}disabled{{ /if}}>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="uk-form-row">
|
|
<label>
|
|
Partie reguliere <input type=radio
|
|
name="game-type"
|
|
value="regular-game"
|
|
{{if ! game.practice && ! game.rain }} checked {{/if}}>
|
|
</label>
|
|
<label>
|
|
Pluie <input type=radio
|
|
name="game-type"
|
|
value="rain"
|
|
{{if game.rain }}checked{{/if}}>
|
|
</label>
|
|
<label>
|
|
Pratique <input
|
|
type=radio
|
|
name="game-type"
|
|
value="practice"
|
|
{{if game.practice && ! game.rain }}checked{{/if}}>
|
|
</label>
|
|
</div>
|
|
|
|
<div id="saving-result">
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<div style="text-align: right">
|
|
<button class="uk-button"
|
|
hx-post="/membre/games/{{game.id}}/switch"
|
|
hx-target="#game-{{ game.id }}"
|
|
>Inverser visiteur/receveur</button>
|
|
<button class="uk-button-danger"
|
|
hx-delete="/membre/games/{{game.id}}"
|
|
hx-confirm="Certain de vouloir supprimer la partie?"
|
|
hx-target="#game-{{ game.id }}"
|
|
hx-swap="delete"
|
|
>Supprimer</button>
|
|
</div>
|
|
</div>
|