class PostFilter(ff.ForgeForm): defaults = dict( ew.SimpleForm.defaults, submit_text=None, method='GET') fields = [ ew.HiddenField( name='page', validator=fev.Int()), ew.FieldSet(label='Post Filter', fields=[ ew.SingleSelectField( name='status', label='Show posts with status', options=[ ew.Option(py_value='-', label='Any'), ew.Option(py_value='spam', label='Spam'), ew.Option(py_value='pending', label='Pending moderation'), ew.Option(py_value='ok', label='Ok')], if_missing='pending'), ew.InputField(name='username', label='Show post filtered by username'), ew.SubmitButton(label='Filter Posts') ]) ]
class ModeratePost(ew.SimpleForm): submit_text = None fields = [ ew.FieldSet(legend='Promote post to its own thread', fields=[ ew.TextField(name='subject', label='Thread title'), ew.SubmitButton(name='promote', label='Promote to thread') ]) ]