Mercurial > public > sg101
diff gpp/gcalendar/forms.py @ 131:5b69d6e01fd4
Creating a common way to display the smiley and markdown help dialogs for a markItUp textarea input form. Converted gcalendar over to it as a trial.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 26 Nov 2009 22:47:17 +0000 |
parents | c0d3b09c9b95 |
children | 7e3ed3eb9b99 |
line wrap: on
line diff
--- a/gpp/gcalendar/forms.py Fri Nov 20 02:44:45 2009 +0000 +++ b/gpp/gcalendar/forms.py Thu Nov 26 22:47:17 2009 +0000 @@ -69,6 +69,8 @@ end_time = forms.TimeField(required=False, widget=forms.Select(choices=TIME_CHOICES)) time_zone = forms.CharField(required=False, widget=forms.HiddenInput()) where = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 60})) + description = forms.CharField(required=False, + widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) TIME_FORMAT = '%H:%M' DEFAULT_START_TIME = '19:00' @@ -81,13 +83,13 @@ class Media: css = { - 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + \ - settings.GPP_THIRD_PARTY_CSS['jquery-ui'] + \ - ('css/gcalendar.css', ) + 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + + settings.GPP_THIRD_PARTY_CSS['jquery-ui'] + + ('css/gcalendar.css', )) } - js = settings.GPP_THIRD_PARTY_JS['markitup'] + \ - settings.GPP_THIRD_PARTY_JS['jquery-ui'] + \ - ('js/timezone.js', 'js/gcalendar.js', ) + js = (settings.GPP_THIRD_PARTY_JS['markitup'] + + settings.GPP_THIRD_PARTY_JS['jquery-ui'] + + ('js/timezone.js', 'js/gcalendar.js', )) def __init__(self, *args, **kwargs): initial = kwargs.get('initial', {}) @@ -150,5 +152,3 @@ class PasswordForm(forms.Form): password = forms.CharField(widget=forms.PasswordInput()) - -# vim: ts=4 sw=4