1.1 --- a/imipweb/calendar.py Mon Sep 28 00:28:39 2015 +0200
1.2 +++ b/imipweb/calendar.py Mon Sep 28 15:20:26 2015 +0200
1.3 @@ -46,14 +46,18 @@
1.4
1.5 args = self.env.get_args()
1.6
1.7 - if not args.has_key("newevent"):
1.8 + for key in args.keys():
1.9 + if key.startswith("newevent-"):
1.10 + i = key[len("newevent-"):]
1.11 + break
1.12 + else:
1.13 return
1.14
1.15 # Create a new event using the available information.
1.16
1.17 slots = args.get("slot", [])
1.18 participants = args.get("participants", [])
1.19 - summary = args.get("summary", [None])[0]
1.20 + summary = args.get("summary-%s" % i, [None])[0]
1.21
1.22 if not slots:
1.23 return
1.24 @@ -561,6 +565,8 @@
1.25
1.26 # Produce a heading and time points for each day.
1.27
1.28 + i = 0
1.29 +
1.30 for day, intervals in all_days:
1.31 groups_for_day = [partitioned.get(day) for partitioned in partitioned_groups]
1.32 is_empty = True
1.33 @@ -606,12 +612,14 @@
1.34
1.35 page.p(class_="newevent-with-periods")
1.36 page.label("Summary:")
1.37 - page.input(name="summary", type="text")
1.38 - page.input(name="newevent", type="submit", value="New event", accesskey="N")
1.39 + page.input(name="summary-%d" % i, type="text")
1.40 + page.input(name="newevent-%d" % i, type="submit", value="New event", accesskey="N")
1.41 page.p.close()
1.42
1.43 page.div.close()
1.44
1.45 + i += 1
1.46 +
1.47 def show_calendar_points(self, intervals, groups, group_types, group_columns):
1.48
1.49 """