Example #1
0
 def setupui(self):
     """配置人员填写"""
     fields = [
         Field("min", type=self._type, label="最小值", comment="最少值,留空表示不限制"),
         Field("max", type=self._type, label="最大值", comment="最大值,留空表示不限制"),
         Field("extra", label="自定义属性", comment="该选项是个可json化的词典,比如{'style':'width:100px', 'ks':'o'}"),
     ]
     form = FormBuilder("configure", fields, render_to_form=False)
     return form.render(self.configure)
Example #2
0
 def setupui(self):
     """配置人员填写"""
     fields = [
         Field("minlen", type="integer", label="最短长度", comment="最少需要选中几个选项,0表示不限制"),
         Field("maxlen", type="integer", label="最长长度", comment="最多需要选中几个选项,0表示不限制"),
         Field("extra", label="自定义属性", comment="该选项是个可json化的词典,比如{'style':'width:100px', 'ks':'o'}"),
     ]
     form = FormBuilder("configure", fields, render_to_form=False)
     return form.render(self.configure)
Example #3
0
 def setupui(self):
     """配置人员填写"""
     fields = [
         Field("minlen", type="integer", label="最短长度", comment="最少需要选中几个选项,0表示不限制"),
         Field("maxlen", type="integer", label="最长长度", comment="最多需要选中几个选项,0表示不限制"),
         Field("cols", type="integer", label="每行显示列数", comment="选项分行显示,每行显示几个选项"),
         Field("options", "text", label="可选项", comment="配置数据源,详见<a href='#datasource'>帮助</a>"),
     ]
     form = FormBuilder("configure", fields, render_to_form=False)
     return form.render(self.configure)