diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-11 16:59:45 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-11 16:59:45 +0200 |
| commit | 0db0ff2f1c712273ac48cb859c24253b1efa8384 (patch) | |
| tree | b92c4bd847ca94ad5cdf5a0b85576328484ff061 /templates/courts.j2 | |
| parent | 39a01979a470e836da1128503e4587cb76eeae33 (diff) | |
First working version with court selection
Diffstat (limited to 'templates/courts.j2')
| -rw-r--r-- | templates/courts.j2 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/templates/courts.j2 b/templates/courts.j2 index a7893a7..3134aca 100644 --- a/templates/courts.j2 +++ b/templates/courts.j2 @@ -1,3 +1,7 @@ -<form hx-post="/courts" hx-trigger="change" hx-swap="outerHTML"> - <input type="number" disabled id="courts" min="1" max="15" name="courts" value="{{ courts }}"> -</form>
\ No newline at end of file +<div class="grid-container"> +{% for court in courts %} + <div class="grid-item"> + <button class={% if court.status %} "active" {% else %} "dormant" {% endif %} hx-post="{{ "/court-toggle/" ~ court.number}}" hx-trigger="click" hx-swap="outerHTML">{{ court.number }}</button> + </div> +{% endfor %} +</div>
\ No newline at end of file |
