From 14331e2c963fdc893fbe1cdbbc21e597f9d80ea4 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Mon, 19 Oct 2009 05:18:36 +0000 Subject: * added form update --- sleekxmpp/plugins/xep_0004.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sleekxmpp/plugins') diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py index ee6646fa..cbc0a236 100644 --- a/sleekxmpp/plugins/xep_0004.py +++ b/sleekxmpp/plugins/xep_0004.py @@ -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: -- cgit v1.2.3