# HG changeset patch # User Paul Boddie # Date 1423059362 -3600 # Node ID aa62dbcee6e3671fe906a67aacad8f32c5a53637 # Parent 08b8165ad45e13212609a3e62eae9393a1655e25 Replaced needs_action with needs_update, inverting the condition. diff -r 08b8165ad45e -r aa62dbcee6e3 imip_manager.py --- a/imip_manager.py Wed Feb 04 15:04:15 2015 +0100 +++ b/imip_manager.py Wed Feb 04 15:16:02 2015 +0100 @@ -511,11 +511,12 @@ # Page fragment methods. - def show_request_controls(self, obj, needs_action): + def show_request_controls(self, obj, needs_update): """ Show form controls for a request concerning 'obj', indicating whether - action is needed if 'needs_action' is specified as a true value. + an update will be performed if 'needs_update' is specified as a true + value. """ page = self.page @@ -535,10 +536,10 @@ else: page.p("This request has not yet been dealt with.") - if needs_action: + if needs_update: + page.p("This request can be updated as follows:") + else: page.p("An action is required for this request:") - else: - page.p("This request can be updated as follows:") page.p() @@ -557,7 +558,7 @@ # Updated objects need to have details updated upon sending. - if not needs_action: + if needs_update: page.input(name="update", type="hidden", value="true") page.p.close() @@ -570,7 +571,7 @@ "ATTENDEE" : "Attendee", } - def show_object_on_page(self, uid, obj, needs_action): + def show_object_on_page(self, uid, obj, needs_update): """ Show the calendar object with the given 'uid' and representation 'obj' @@ -684,7 +685,7 @@ if found_obj: page.a(found_obj.get_value("SUMMARY"), href=self.env.new_url(found_uid)) - self.show_request_controls(obj, needs_action) + self.show_request_controls(obj, needs_update) page.form.close() def show_requests_on_page(self): @@ -779,7 +780,7 @@ return True self.new_page(title="Event") - self.show_object_on_page(uid, obj, is_request and not handled) + self.show_object_on_page(uid, obj, not is_request) return True