示例#1
0
 def fieldset(self, html, bfield, container):
     control = Html('div', cn='control-group')
     if html.attr('type') == 'checkbox':
         control.append(Html('label', html, bfield.label, cn='checkbox'))
     else:
         label = Html('label', bfield.label, cn='control-label')
         label.attr('for', bfield.id)
         control.append(label)
         control.append(Html('div', html, cn='controls'))
     yield control
示例#2
0
 def fieldset(self, html, bfield, container):
     control = Html('div', cn='control-group')
     if html.attr('type') == 'checkbox':
         control.append(Html('label', html, bfield.label, cn='checkbox'))
     else:
         label = Html('label', bfield.label, cn='control-label')
         label.attr('for', bfield.id)
         control.append(label)
         control.append(Html('div', html, cn='controls'))
     yield control
示例#3
0
文件: fields.py 项目: pombredanne/lux
 def html(self, bfield, **params):
     html = Html('select')
     if self.multiple:
         html.attr('multiple', 'multiple')
     self.choices.add_options(bfield, html)
     return html
示例#4
0
文件: fields.py 项目: pombredanne/lux
 def html(self, bfield, **params):
     html = Html('select')
     if self.multiple:
         html.attr('multiple', 'multiple')
     self.choices.add_options(bfield, html)
     return html