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)