1 # GNU MediaGoblin -- federated, autonomous media hosting
2 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
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.
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.
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/>.
18 from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
20 ACTION_CHOICES = [(_(u'takeaway'),_('Take away privilege')),
21 (_(u'userban'),_('Ban the user')),
22 (_(u'closereport'),_('Close the report without taking an action'))]
24 class PrivilegeAddRemoveForm(wtforms.Form):
25 giving_privilege = wtforms.HiddenField('',[wtforms.validators.required()])
26 privilege_name = wtforms.HiddenField('',[wtforms.validators.required()])
28 class ReportResolutionForm(wtforms.Form):
29 action_to_resolve = wtforms.RadioField(
30 _('What action will you take to resolve this report'),
31 validators=[wtforms.validators.required()],
32 choices=ACTION_CHOICES)
33 targeted_user = wtforms.HiddenField('',
34 validators=[wtforms.validators.required()])
35 user_banned_until = wtforms.DateField(
36 _('User will be banned until:'),
38 validators=[wtforms.validators.optional()])
39 resolution_content = wtforms.TextAreaField()