1.1 --- a/imipweb/event.py Tue Oct 06 00:03:42 2015 +0200
1.2 +++ b/imipweb/event.py Tue Oct 06 00:09:07 2015 +0200
1.3 @@ -716,25 +716,7 @@
1.4 save = args.has_key("save")
1.5 decline = filter(None, [(arg.startswith("decline-") and arg[len("decline-"):]) for arg in args.keys()])
1.6
1.7 - # Decline a counter-proposal.
1.8 -
1.9 - if decline:
1.10 - for s in decline:
1.11 - try:
1.12 - i = int(s)
1.13 - except (IndexError, ValueError):
1.14 - pass
1.15 - else:
1.16 - attendee_uri = get_uri(args.get("decline", [])[i])
1.17 - self.process_declined_counter(attendee_uri)
1.18 -
1.19 - # Update the counter-proposals synchronously instead of
1.20 - # assuming that the outgoing handler will have done so
1.21 - # before the form is refreshed.
1.22 -
1.23 - self.remove_counter(attendee_uri)
1.24 -
1.25 - have_action = reply or discard or create or cancel or ignore or save
1.26 + have_action = reply or discard or create or cancel or ignore or save or decline
1.27
1.28 if not have_action:
1.29 return ["action"]
1.30 @@ -830,6 +812,29 @@
1.31 self.remove_event(self.uid, self.recurrenceid)
1.32 self.remove_request(self.uid, self.recurrenceid)
1.33
1.34 + # Decline a counter-proposal.
1.35 +
1.36 + elif decline:
1.37 + for s in decline:
1.38 + try:
1.39 + i = int(s)
1.40 + except (IndexError, ValueError):
1.41 + pass
1.42 + else:
1.43 + attendee_uri = get_uri(args.get("decline", [])[i])
1.44 + self.process_declined_counter(attendee_uri)
1.45 +
1.46 + # Update the counter-proposals synchronously instead of
1.47 + # assuming that the outgoing handler will have done so
1.48 + # before the form is refreshed.
1.49 +
1.50 + self.remove_counter(attendee_uri)
1.51 +
1.52 + # Redirect to the event.
1.53 +
1.54 + self.redirect(self.env.get_url())
1.55 + handled = False
1.56 +
1.57 else:
1.58 handled = False
1.59