From 3d8fabbb28845b8d38c5bcf34f3f0ac985b86745 Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Tue, 14 Apr 2020 13:32:03 +0200 Subject: [PATCH] App: JavaScript buttons for switching days --- app/templates/main.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/templates/main.html b/app/templates/main.html index 1731398..205b788 100644 --- a/app/templates/main.html +++ b/app/templates/main.html @@ -67,9 +67,11 @@ <p id=intro>This table summarizes meetings scheduled in our Zoom accounts. Use standard Zoom interface to create and modify reservations. Please keep in mind that there is a slight delay between Zoom and this table. Please report all bugs to Martin Mareš.</p> - <form method=GET action="?"> + <form id=f method=GET action="?"> <label for=date>Date:</label> - <input id=date type=date name=date value="{{ g.date }}"> + <input id=date type=date name=date step=1 value="{{ g.date }}"> + <button type=button onclick="document.getElementById('date').stepDown(); document.getElementById('f').requestSubmit()">←</button> + <button type=button onclick="document.getElementById('date').stepUp(); document.getElementById('f').requestSubmit()">→</button> <select name=hours> <option value=0{{ " selected" if g.hours==0 else "" }}>Study hours</option> <option value=1{{ " selected" if g.hours==1 else "" }}>Working hours</option> -- GitLab