|
Pierre-Yves Chibon |
ab2f8f |
#-*- coding: utf-8 -*-
|
|
Pierre-Yves Chibon |
ab2f8f |
|
|
Pierre-Yves Chibon |
ab2f8f |
"""
|
|
Pierre-Yves Chibon |
ab2f8f |
(c) 2014 - Copyright Red Hat Inc
|
|
Pierre-Yves Chibon |
ab2f8f |
|
|
Pierre-Yves Chibon |
ab2f8f |
Authors:
|
|
Pierre-Yves Chibon |
ab2f8f |
Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>
|
|
Pierre-Yves Chibon |
ab2f8f |
|
|
Pierre-Yves Chibon |
ab2f8f |
"""
|
|
Pierre-Yves Chibon |
ab2f8f |
|
|
Pierre-Yves Chibon |
ab2f8f |
from flask.ext import wtf
|
|
Pierre-Yves Chibon |
ab2f8f |
import wtforms
|
|
Pierre-Yves Chibon |
ab2f8f |
|
|
Pierre-Yves Chibon |
ab2f8f |
|
|
Pierre-Yves Chibon |
ab2f8f |
class ProjectForm(wtf.Form):
|
|
Pierre-Yves Chibon |
ab2f8f |
''' Form to create or edit project. '''
|
|
Pierre-Yves Chibon |
ab2f8f |
name = wtforms.TextField(
|
|
Pierre-Yves Chibon |
ab2f8f |
'Project name *',
|
|
Pierre-Yves Chibon |
ab2f8f |
[wtforms.validators.Required()]
|
|
Pierre-Yves Chibon |
ab2f8f |
)
|
|
Pierre-Yves Chibon |
ab2f8f |
description = wtforms.TextField(
|
|
Pierre-Yves Chibon |
ab2f8f |
'description',
|
|
Pierre-Yves Chibon |
ab2f8f |
[wtforms.validators.optional()]
|
|
Pierre-Yves Chibon |
ab2f8f |
)
|
|
Pierre-Yves Chibon |
a9bfbe |
|
|
Pierre-Yves Chibon |
a9bfbe |
|
|
Pierre-Yves Chibon |
a9bfbe |
class IssueForm(wtf.Form):
|
|
Pierre-Yves Chibon |
a9bfbe |
''' Form to create or edit an issue. '''
|
|
Pierre-Yves Chibon |
a9bfbe |
title = wtforms.TextField(
|
|
Pierre-Yves Chibon |
a9bfbe |
'Title*',
|
|
Pierre-Yves Chibon |
a9bfbe |
[wtforms.validators.Required()]
|
|
Pierre-Yves Chibon |
a9bfbe |
)
|
|
Pierre-Yves Chibon |
a9bfbe |
content = wtforms.TextAreaField(
|
|
Pierre-Yves Chibon |
a9bfbe |
'Content*',
|
|
Pierre-Yves Chibon |
a9bfbe |
[wtforms.validators.Required()]
|
|
Pierre-Yves Chibon |
a9bfbe |
)
|