Commit | Line | Data |
---|---|---|
f646f5d3 | 1 | # GNU MediaGoblin -- federated, autonomous media hosting |
cf29e8a8 | 2 | # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. |
f646f5d3 JW |
3 | # |
4 | # This program is free software: you can redistribute it and/or modify | |
5 | # it under the terms of the GNU Affero General Public License as published by | |
6 | # the Free Software Foundation, either version 3 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU Affero General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | ||
17 | import wtforms | |
be5be115 | 18 | from wtforms.ext.sqlalchemy.fields import QuerySelectField |
ae3bc7fa | 19 | from mediagoblin.tools.translate import fake_ugettext_passthrough as _ |
7960ac98 | 20 | |
f646f5d3 | 21 | class MediaCommentForm(wtforms.Form): |
7960ac98 | 22 | comment_content = wtforms.TextAreaField( |
416b439f | 23 | '', |
9bc564ff | 24 | [wtforms.validators.Required()]) |
502073f2 | 25 | |
502073f2 | 26 | class ConfirmDeleteForm(wtforms.Form): |
7624c641 CAW |
27 | confirm = wtforms.BooleanField( |
28 | _('I am sure I want to delete this')) | |
be5be115 AW |
29 | |
30 | class ConfirmCollectionItemRemoveForm(wtforms.Form): | |
31 | confirm = wtforms.BooleanField( | |
32 | _('I am sure I want to remove this item from the collection')) | |
33 | ||
34 | class MediaCollectForm(wtforms.Form): | |
35 | collection = QuerySelectField(allow_blank=True, blank_text=_('-- Select --'), get_label='title',) | |
36 | note = wtforms.TextAreaField( | |
37 | _('Include a note'), | |
38 | [wtforms.validators.Optional()],) | |
39 | collection_title = wtforms.TextField( | |
40 | _('Title'), | |
41 | [wtforms.validators.Length(min=0, max=500)]) | |
42 | collection_description = wtforms.TextAreaField( | |
43 | _('Description of this collection'), | |
44 | description=_("""You can use | |
45 | <a href="http://daringfireball.net/projects/markdown/basics"> | |
46 | Markdown</a> for formatting.""")) |