mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-24 11:50:53 +00:00
* added form update
This commit is contained in:
parent
349b1c0b28
commit
14331e2c96
1 changed files with 6 additions and 0 deletions
|
@ -108,6 +108,12 @@ class Form(FieldContainer):
|
|||
form1.fields[field.var].addOption(option, label)
|
||||
return form1
|
||||
|
||||
def update(self, form):
|
||||
values = form.getValues()
|
||||
for var in values:
|
||||
if var in self.fields:
|
||||
self.fields[var].setValue(self.fields[var])
|
||||
|
||||
def getValues(self):
|
||||
result = {}
|
||||
for field in self.fields:
|
||||
|
|
Loading…
Reference in a new issue