Commit 078d45e1 authored by Martin Mareš's avatar Martin Mareš
Browse files

Dobřichovice: Oprava chyby při přepínání hodin

parent f3b2aa97
......@@ -12,8 +12,8 @@
<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=1{{ " selected" if g.hours==0 else "" }}>Školní hodiny</option>
<option value=2{{ " selected" if g.hours==1 else "" }}>Celý den</option>
<option value=0{{ " selected" if g.hours==0 else "" }}>Školní hodiny</option>
<option value=1{{ " selected" if g.hours==1 else "" }}>Celý den</option>
</select>
<input type=submit name=submit value="Odeslat">
</form>
......
......@@ -95,7 +95,7 @@ def main_page():
g.dow = dt.strftime("%A")
hours_arg = request.args.get("hours", "")
if hours_arg in ["0", "1", "2"]:
if hours_arg in ["0", "1"]:
g.hours = int(hours_arg)
else:
g.hours = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment