symposion_app/symposion/reviews/forms.py
Patrick Altman 11f697d137 Massively upgrade symposion
* Remove markitup (to be replaced with Ace editor)
* Use DUA decorators
* Removed custom signup bits
* Upgraded dependencies
* Added migrations
* Namespaced template locations
* Removed html5parser/sanitizer (for now) - parsing functionality
should be moved out entirely to a hooks
* Replaced ProposalScoreExpression object with a  function that returns
F() expressions
2015-10-16 12:37:35 -05:00

38 lines
987 B
Python

from __future__ import unicode_literals
from django import forms
from django.utils.translation import ugettext_lazy as _
from symposion.reviews.models import Review, Comment, ProposalMessage, VOTES
class ReviewForm(forms.ModelForm):
class Meta:
model = Review
fields = ["vote", "comment"]
def __init__(self, *args, **kwargs):
super(ReviewForm, self).__init__(*args, **kwargs)
self.fields["vote"] = forms.ChoiceField(
widget=forms.RadioSelect(),
choices=VOTES.CHOICES
)
class ReviewCommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ["text"]
class SpeakerCommentForm(forms.ModelForm):
class Meta:
model = ProposalMessage
fields = ["message"]
class BulkPresentationForm(forms.Form):
talk_ids = forms.CharField(
label=_("Talk ids"),
max_length=500,
help_text=_("Provide a comma seperated list of talk ids to accept.")
)