Parent: [e5695e] (diff)

Child: [3abb2e] (diff)

Download this file

bin_form.py    19 lines (16 with data), 639 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import tw.forms as twf
import ew
from pyforge.lib.widgets import form_fields as ffw
from pylons import c
from forgetracker import model
from formencode import validators as fev
class BinForm(ew.SimpleForm):
name="bin_form"
submit_text = "Save Bin"
@property
def fields(self):
fields = [
ew.TextField(name='summary', label='Bin Name', validator=fev.UnicodeString(not_empty=True)),
ew.TextField(name='terms', label='Search Terms', validator=fev.UnicodeString(not_empty=True)),
ew.HiddenField(name='sort', label='Sort Order', validator=fev.UnicodeString())]
return fields