Gateway registration, unregistration & edition
- default values added in form - DBus bridge: fixed array of struct management when adding dynamically a method - fixed doc for some methods - ugly fix for presence status - added dependency for XEP-0077 in XEP-0100 plugin - Wix: added unregister button in gateways manager - Wix: added privacy warning in gateways manager
This commit is contained in:
parent
914f7da809
commit
e3a3c1e975
1 changed files with 159 additions and 39 deletions
|
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
from logging import debug, info, error
|
||||
from xml.dom import minidom
|
||||
from wokkel import data_form
|
||||
import pdb
|
||||
|
||||
class XMLTools:
|
||||
|
|
@ -57,10 +58,24 @@ class XMLTools:
|
|||
elem.setAttribute('name', field.var)
|
||||
elem.setAttribute('type', __field_type)
|
||||
elem.setAttribute('label', field.label)
|
||||
#text = doc.createTextNode(field.value)
|
||||
#elem.appendChild(text)
|
||||
if field.value:
|
||||
text = doc.createTextNode(field.value)
|
||||
elem.appendChild(text)
|
||||
top_element.appendChild(elem)
|
||||
|
||||
result = doc.toxml()
|
||||
doc.unlink()
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def tupleList2dataForm(values):
|
||||
"""convert a list of tuples (name,value) to a wokkel submit data form"""
|
||||
form = data_form.Form('submit')
|
||||
for value in values:
|
||||
field = data_form.Field(var=value[0], value=value[1])
|
||||
form.addField(field)
|
||||
|
||||
return form
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue