1.1 --- a/imipweb/calendar.py Sun Oct 25 22:58:34 2015 +0100
1.2 +++ b/imipweb/calendar.py Sun Oct 25 23:16:54 2015 +0100
1.3 @@ -29,9 +29,9 @@
1.4 get_overlapping, \
1.5 get_scale, get_slots, get_spans, partition_by_day, \
1.6 Period, Point
1.7 -from imipweb.resource import ResourceClient
1.8 +from imipweb.resource import FormUtilities, ResourceClient
1.9
1.10 -class CalendarPage(ResourceClient):
1.11 +class CalendarPage(ResourceClient, FormUtilities):
1.12
1.13 "A request handler for the calendar page."
1.14
1.15 @@ -287,9 +287,10 @@
1.16 """
1.17
1.18 page = self.page
1.19 + args = self.env.get_args()
1.20
1.21 - page.input(name="showdays", type="checkbox", value="show", id="showdays", accesskey="D")
1.22 - page.input(name="hidebusy", type="checkbox", value="hide", id="hidebusy", accesskey="B")
1.23 + self.control("showdays", "checkbox", "show", ("show" in args.get("showdays", [])), id="showdays", accesskey="D")
1.24 + self.control("hidebusy", "checkbox", "hide", ("hide" in args.get("hidebusy", [])), id="hidebusy", accesskey="B")
1.25
1.26 page.p(id_="calendar-controls", class_="controls")
1.27 page.span("Select days or periods for a new event.")