Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from django import *
from .models import *
COMMENT_ACTION_CHOICES = (
# (0, 'modify'),
(1, 'accept'),
(2, 'refuse (give reason below)'),
)
COMMENT_REFUSAL_CHOICES = (
(0, '-'),
(-1, 'unclear'),
(-2, 'incorrect'),
(-3, 'not useful'),
)
AUTHOR_REPLY_ACTION_CHOICES = (
# (0, 'modify'),
(1, 'accept'),
(2, 'refuse (give reason below)'),
)
AUTHOR_REPLY_REFUSAL_CHOICES = (
(0, '-'),
(-1, 'unclear'),
(-2, 'incorrect'),
(-3, 'not useful'),
(-4, 'not from an author'),
)
class CommentForm(forms.Form):
comment_text = forms.CharField(widget=forms.Textarea(attrs={'rows': 10, 'cols':80}), label='', required=True) # need TextField but doesn't exist
class VetCommentForm(forms.Form):
action_option = forms.ChoiceField(widget=forms.RadioSelect, choices=COMMENT_ACTION_CHOICES, required=True, label='Action')
refusal_reason = forms.ChoiceField(choices=COMMENT_REFUSAL_CHOICES)
email_response_field = forms.CharField(widget=forms.Textarea(), label='Justification (optional)', required=False)
class AuthorReplyForm(forms.Form):
reply_text = forms.CharField(widget=forms.Textarea(attrs={'rows': 10, 'cols':80}), label='', required=True)
# need TextField but doesn't exist
class VetAuthorReplyForm(forms.Form):
action_option = forms.ChoiceField(widget=forms.RadioSelect, choices=AUTHOR_REPLY_ACTION_CHOICES, required=True, label='Action')
refusal_reason = forms.ChoiceField(choices=AUTHOR_REPLY_REFUSAL_CHOICES)
email_response_field = forms.CharField(widget=forms.Textarea(), label='Justification (optional)', required=False)