Exemplo n.º 1
0
 class fields(ew_core.NameList):
     weekday = ew.SingleSelectField(
         label='Weekday',
         options=[ew.Option(py_value=wd, label=wd) for wd in weekdays],
         validator=V.OneOfValidator(weekdays))
     starttime = ew.TextField(label='Start time',
                              validator=V.TimeValidator())
     endtime = ew.TextField(label='End time', validator=V.TimeValidator())
Exemplo n.º 2
0
 class fields(ew_core.NameList):
     weekday = ew.SingleSelectField(
         label='Weekday',
         options=[ew.Option(py_value=wd, label=wd) for wd in weekdays],
         validator=formencode.All(V.OneOfValidator(weekdays),
                                  fev.UnicodeString(not_empty=True)))
     starttime = ew.TextField(label='Start time',
                              validator=formencode.All(
                                  V.TimeValidator(),
                                  fev.UnicodeString(not_empty=True)))
     endtime = ew.TextField(label='End time',
                            validator=formencode.All(
                                V.TimeValidator(),
                                fev.UnicodeString(not_empty=True)))