gremmie@1: """ gremmie@1: Forms for the member map application. gremmie@1: """ gremmie@1: from django import forms bgneal@6: from django.conf import settings bgneal@6: gremmie@1: from membermap.models import MapEntry gremmie@1: gremmie@1: gremmie@1: class MapEntryForm(forms.ModelForm): bgneal@133: location = forms.CharField(required=True, bgneal@133: widget=forms.TextInput(attrs={'size': 64, 'maxlength': 255})) bgneal@133: message = forms.CharField(required=False, bgneal@133: widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) gremmie@1: gremmie@1: class Meta: gremmie@1: model = MapEntry gremmie@1: fields = ('location', 'message') gremmie@1: gremmie@1: class Media: gremmie@1: css = { bgneal@133: 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + bgneal@133: settings.GPP_THIRD_PARTY_CSS['jquery-ui']) gremmie@1: } bgneal@133: js = (settings.GPP_THIRD_PARTY_JS['markitup'] + bgneal@133: settings.GPP_THIRD_PARTY_JS['jquery-ui']) gremmie@1: