diff --git a/Wizard2_GUI.py b/Wizard2_GUI.py index 322d2e5..efa1eeb 100644 --- a/Wizard2_GUI.py +++ b/Wizard2_GUI.py @@ -77,15 +77,26 @@ def Render (self): return Phase.Render(self) class Phase_Cancel (Phase): - def __init__ (self, title, caption=None): + def __init__ (self, title): Phase.__init__ (self, title) - self.buttons_added = False - self.button_caption = caption + self.buttons_added = False def Render (self): if not self.buttons_added: self.buttons_added = True - self += CTK.DruidButtonsPanel_Cancel (caption = self.button_caption) + self += CTK.DruidButtonsPanel_Cancel() + + return Phase.Render(self) + +class Phase_Close (Phase): + def __init__ (self, title): + Phase.__init__ (self, title) + self.buttons_added = False + + def Render (self): + if not self.buttons_added: + self.buttons_added = True + self += CTK.DruidButtonsPanel_Close() return Phase.Render(self) @@ -398,7 +409,15 @@ def __init__ (self, Install_Class, next_url): # Select Install Type # -class Stage_Finished (Phase_Cancel): +class Stage_Finished (Phase_Close): + class Apply: + def __call__ (self): + return CTK.cfg_reply_ajax_ok() + def __init__ (self): - Phase_Cancel.__init__ (self, _("Installation Finished"), caption="Close") + Phase_Close.__init__ (self, _("Installation Finished")) self += CTK.RawHTML ('We are done and dusted!') + + +URL_STAGE_FINISHED_APPLY = "/wizard2/stages/finished/apply" +CTK.publish ('^%s'%(URL_STAGE_FINISHED_APPLY), Stage_Finished.Apply, method="POST")