diff sat.tac @ 36:6491b7956c80

wix: Form submitting, first draft
author Goffi <goffi@goffi.org>
date Mon, 14 Dec 2009 02:11:05 +1100
parents b9bb5d8e0cc7
children a61beb21d16d
line wrap: on
line diff
--- a/sat.tac	Sun Dec 13 20:24:48 2009 +1100
+++ b/sat.tac	Mon Dec 14 02:11:05 2009 +1100
@@ -278,6 +278,7 @@
         self.bridge.register("isConnected", self.isConnected)
         self.bridge.register("launchAction", self.launchAction)
         self.bridge.register("confirmationAnswer", self.confirmationAnswer)
+        self.bridge.register("submitForm", self.submitForm)
         self.bridge.register("getProgress", self.getProgress)
 
         self._import_plugins()
@@ -418,6 +419,12 @@
         else:
             self.actionResult(action_id, "SUPPRESS", {})
 
+    def submitForm(self, target, fields):
+        """Called when a form is submited"""
+        to_jid = jid.JID(target)
+        print "Form submitted !", fields
+        return self.get_next_id()
+
     ## Client management ##
 
     def setParam(self, name, value, category):