mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-20 14:33:58 +02:00
...
This commit is contained in:
parent
bdefb6b03c
commit
4569bd22d3
1 changed files with 4 additions and 3 deletions
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
from calibre import as_unicode
|
||||
|
||||
# Forms {{{
|
||||
class Control(object):
|
||||
|
||||
def __init__(self, qwe):
|
||||
|
|
@ -119,10 +120,10 @@ def controls(self):
|
|||
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 @@ def submit_control(self, submit_control_selector=None):
|
|||
if c.type == 'image':
|
||||
return c
|
||||
|
||||
|
||||
# }}}
|
||||
|
||||
class FormsMixin(object):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue