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
This commit is contained in:
parent
80a7423f02
commit
4d15d4a4eb
1 changed files with 15 additions and 15 deletions
|
|
@ -22,7 +22,7 @@ from twisted.words.xish import domish
|
|||
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 @@ class Tarot(object):
|
|||
|
||||
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 @@ class Tarot(object):
|
|||
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':
|
||||
|
|
|
|||
Loading…
Reference in a new issue