X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Fmedia_types%2Fblog%2Fforms.py;h=12857e2817825bbfe6e0f480fce62d9d8cbebc6a;hb=90779509bbe65ab56dd137ffb9d5019f498e79e1;hp=fa409519b09d8c9756d433fdbb502d6cbd723877;hpb=4daf5ddbc615c6c832eb01f742e93b93c01cecb9;p=mediagoblin.git diff --git a/mediagoblin/media_types/blog/forms.py b/mediagoblin/media_types/blog/forms.py index fa409519..12857e28 100644 --- a/mediagoblin/media_types/blog/forms.py +++ b/mediagoblin/media_types/blog/forms.py @@ -21,22 +21,25 @@ from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ from mediagoblin.tools.licenses import licenses_as_choices class BlogPostEditForm(wtforms.Form): - title = wtforms.TextField(_('Title'), - [wtforms.validators.Length(min=0, max=500)]) - description = wtforms.TextAreaField(_('Content')) - tags = wtforms.TextField(_('Tags'), [tag_length_validator], - description="Seperate tags by commas.") - license = wtforms.SelectField(_('License'), - [wtforms.validators.Optional(),], choices=licenses_as_choices()) + title = wtforms.StringField(_('Title'), + [wtforms.validators.Length(min=0, max=500)]) + description = wtforms.TextAreaField(_('Description')) + tags = wtforms.StringField( + _('Tags'), [tag_length_validator], + description="Seperate tags by commas." + ) + license = wtforms.SelectField( + _('License'), + [wtforms.validators.Optional()], + choices=licenses_as_choices() + ) class BlogEditForm(wtforms.Form): - title = wtforms.TextField(_('Title'), - [wtforms.validators.Length(min=0, max=500)]) - description = wtforms.TextAreaField(_('Content')) - + title = wtforms.StringField(_('Title'), + [wtforms.validators.Length(min=0, max=500)]) + description = wtforms.TextAreaField(_('Description')) - - - - +class ConfirmDeleteForm(wtforms.Form): + confirm = wtforms.BooleanField( + _('I am sure I want to delete this'))