Mercurial > public > sg101
comparison gpp/forums/forms.py @ 484:bbbc357ac5f3
For #233; first commit for adding social media sharing buttons to news stories.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 18 Oct 2011 00:04:37 +0000 |
parents | 3b30286adba5 |
children |
comparison
equal
deleted
inserted
replaced
483:3ac558402014 | 484:bbbc357ac5f3 |
---|---|
26 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + | 26 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + |
27 settings.GPP_THIRD_PARTY_CSS['jquery-ui']), | 27 settings.GPP_THIRD_PARTY_CSS['jquery-ui']), |
28 } | 28 } |
29 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + | 29 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + |
30 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + | 30 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + |
31 ('js/forums.js', )) | 31 ['js/forums.js']) |
32 | 32 |
33 def __init__(self, *args, **kwargs): | 33 def __init__(self, *args, **kwargs): |
34 super(NewPostForm, self).__init__(*args, **kwargs) | 34 super(NewPostForm, self).__init__(*args, **kwargs) |
35 attachments = args[0].getlist('attachment') if len(args) else [] | 35 attachments = args[0].getlist('attachment') if len(args) else [] |
36 self.attach_proc = AttachmentProcessor(attachments) | 36 self.attach_proc = AttachmentProcessor(attachments) |
80 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + | 80 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + |
81 settings.GPP_THIRD_PARTY_CSS['jquery-ui']), | 81 settings.GPP_THIRD_PARTY_CSS['jquery-ui']), |
82 } | 82 } |
83 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + | 83 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + |
84 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + | 84 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + |
85 ('js/forums.js', )) | 85 ['js/forums.js']) |
86 | 86 |
87 def __init__(self, user, forum, *args, **kwargs): | 87 def __init__(self, user, forum, *args, **kwargs): |
88 super(NewTopicForm, self).__init__(*args, **kwargs) | 88 super(NewTopicForm, self).__init__(*args, **kwargs) |
89 self.user = user | 89 self.user = user |
90 self.forum = forum | 90 self.forum = forum |
157 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + | 157 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + |
158 settings.GPP_THIRD_PARTY_CSS['jquery-ui']), | 158 settings.GPP_THIRD_PARTY_CSS['jquery-ui']), |
159 } | 159 } |
160 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + | 160 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + |
161 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + | 161 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + |
162 ('js/forums.js', )) | 162 ['js/forums.js']) |
163 | 163 |
164 def __init__(self, *args, **kwargs): | 164 def __init__(self, *args, **kwargs): |
165 topic_name = kwargs.pop('topic_name', None) | 165 topic_name = kwargs.pop('topic_name', None) |
166 super(PostForm, self).__init__(*args, **kwargs) | 166 super(PostForm, self).__init__(*args, **kwargs) |
167 | 167 |