diff src/plugins/plugin_misc_tarot.py @ 761:2f8d72226bc0

core (xml_tools): dataForm*2XML renamed to dataForm*2XMLUI and now return XMLUI instead of raw XML + submit_id is managed, and session_id is returned if present
author Goffi <goffi@goffi.org>
date Tue, 24 Dec 2013 15:43:22 +0100
parents 56aa0e98c92e
children bfabeedbf32e
line wrap: on
line diff
--- a/src/plugins/plugin_misc_tarot.py	Tue Dec 24 15:19:18 2013 +0100
+++ b/src/plugins/plugin_misc_tarot.py	Tue Dec 24 15:43:22 2013 +0100
@@ -22,7 +22,7 @@
 from twisted.words.protocols.jabber import jid
 from wokkel import data_form
 
-from sat.tools.xml_tools import dataForm2XML
+from sat.tools.xml_tools import dataForm2XMLUI
 from sat_frontends.tools.games import TarotCard
 from time import time
 import random
@@ -474,7 +474,7 @@
 
             elif elt.name == 'contrat':  # it's time to choose contrat
                 form = data_form.Form.fromElement(elt.firstChildElement())
-                xml_data = dataForm2XML(form)
+                xml_data = dataForm2XMLUI(form, "").toXml()
                 self.host.bridge.tarotGameChooseContrat(room_jid.userhost(), xml_data, profile)
 
             elif elt.name == 'contrat_choosed':
@@ -613,7 +613,7 @@
                 for looser in elt.elements(name='looser', uri=NS_CG):
                     loosers.append(unicode(looser))
                 form = data_form.Form.fromElement(form_elt)
-                xml_data = dataForm2XML(form)
+                xml_data = dataForm2XMLUI(form, "").toXml()
                 self.host.bridge.tarotGameScore(room_jid.userhost(), xml_data, winners, loosers, profile)
             elif elt.name == 'error':
                 if elt['type'] == 'invalid_cards':