@@ -164,11 +164,11 @@ class SearchEventForm(forms.Form):
164164 if not 'Kosovo' in list (dict (countries ._countries ).values ()):
165165 countries ._countries .append ((u'XK' , u'Kosovo' ))
166166
167- search = forms .CharField (
167+ q = forms .CharField (
168168 required = False ,
169169 widget = forms .TextInput (attrs = {'placeholder' : 'Search for event name or tag' , 'class' : 'form-control' })
170170 )
171- past_events = forms .BooleanField (
171+ past = forms .BooleanField (
172172 label = 'Include past events' ,
173173 required = False ,
174174 widget = forms .CheckboxInput (attrs = {'class' : 'search-form-element' }),
@@ -197,15 +197,18 @@ class SearchEventForm(forms.Form):
197197 def __init__ (self , * args , ** kwargs ):
198198 country_code = kwargs .pop ('country_code' , None )
199199 past_events = kwargs .pop ('past_events' , False )
200- search_query = kwargs .pop ('search' , None )
200+ search_query = kwargs .pop ('q' , None )
201+ theme = kwargs .pop ('theme' , None )
202+ audience = kwargs .pop ('audience' , None )
203+
201204 super (SearchEventForm , self ).__init__ (* args , ** kwargs )
205+
202206 if country_code :
203207 self .fields ['country' ].initial = country_code
204- self .fields ['past_events ' ].initial = past_events
208+ self .fields ['past ' ].initial = past_events
205209 if search_query :
206- self .fields ['search' ].initial = search_query
207-
208-
209-
210-
211-
210+ self .fields ['q' ].initial = search_query
211+ if theme :
212+ self .fields ['theme' ].initial = theme
213+ if audience :
214+ self .fields ['audience' ].initial = audience
0 commit comments