summaryrefslogtreecommitdiff
path: root/Mailman/htmlformat.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/htmlformat.py')
-rw-r--r--Mailman/htmlformat.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py
index 85395d691..987df1a7a 100644
--- a/Mailman/htmlformat.py
+++ b/Mailman/htmlformat.py
@@ -437,8 +437,6 @@ class VerticalSpacer:
class RadioButtonArray:
def __init__(self, name, button_names, checked=None, horizontal=1,
values=None):
- # XXX: horizontal doesn't really work, and besides there's no good way
- # to ask for this in the GetConfigOptions(). -baw
self.button_names = button_names
self.horizontal = horizontal
self.name = name
@@ -452,19 +450,19 @@ class RadioButtonArray:
def Format(self, indent=0):
t = Table(cellspacing=5)
- items = []
- l = len(self.button_names)
+ items = []
for i, name, value in map(None,
- range(len(self.button_names)),
- self.button_names, self.values):
- checked = (self.checked == i)
- items.append(RadioButton(self.name, value, checked))
- items.append(name)
+ range(len(self.button_names)),
+ self.button_names,
+ self.values):
+ ischecked = (self.checked == i)
+ item = RadioButton(self.name, value, ischecked).Format() + name
+ items.append(item)
+ if not self.horizontal:
+ t.AddRow(items)
+ items = []
if self.horizontal:
t.AddRow(items)
- else:
- for item in items:
- t.AddRow([item])
return t.Format(indent)
class UnorderedList(Container):