From 4569bd22d3943b52ccda68c15a4e357c5a472059 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 20 Sep 2011 19:56:08 -0600 Subject: [PATCH] ... --- src/calibre/web/jsbrowser/forms.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/web/jsbrowser/forms.py b/src/calibre/web/jsbrowser/forms.py index e415fef05d..69df2f13a1 100644 --- a/src/calibre/web/jsbrowser/forms.py +++ b/src/calibre/web/jsbrowser/forms.py @@ -10,6 +10,7 @@ __docformat__ = 'restructuredtext en' from calibre import as_unicode +# Forms {{{ class Control(object): def __init__(self, qwe): @@ -119,10 +120,10 @@ class Form(object): def __getitem__(self, key): for x in self.input_controls: if key == x.name: - return x + return x.value for x in (self.radio_controls, self.select_controls): try: - return x[key] + return x[key].value except KeyError: continue raise KeyError('No control with the name %s in this form'%key) @@ -158,7 +159,7 @@ class Form(object): if c.type == 'image': return c - +# }}} class FormsMixin(object):