示例#1
0
class TripleToggle(Toggle):
    def __init__(self, lname, llabel, mname, mlabel, rname, rlabel):
        Toggle.__init__(self, lname, llabel)
        self.mtoggle = Toggle(mname, mlabel)
        self.rtoggle = Toggle(rname, rlabel)

    def _input(self, info):
        left_toggle = Toggle._input(self, info)
        middle_label = self.mtoggle._label(info)
        middle_toggle = self.mtoggle._input(info)
        right_label = self.rtoggle._label(info)
        right_toggle = self.rtoggle._input(info)
        return ('<table><tr><td style="padding-left: 0px;">' + left_toggle +
                '<td style="padding-left: 2em;">%s</td><td>%s</td>' %
                (middle_label, middle_toggle) +
                '<td style="padding-left: 2em;">%s</td><td>%s</td>' %
                (right_label, right_toggle) + '</td></tr></table>')
示例#2
0
 def _input(self, info):
     left_toggle = Toggle._input(self, info)
     middle_label = self.mtoggle._label(info)
     middle_toggle = self.mtoggle._input(info)
     right_label = self.rtoggle._label(info)
     right_toggle = self.rtoggle._input(info)
     return ('<table><tr><td style="padding-left: 0px;">' + left_toggle +
             '<td style="padding-left: 2em;">%s</td><td>%s</td>' %
             (middle_label, middle_toggle) +
             '<td style="padding-left: 2em;">%s</td><td>%s</td>' %
             (right_label, right_toggle) + '</td></tr></table>')