This repository was archived by the owner on Sep 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 489489 u'ZA' : None ,
490490 u'ZM' : None ,
491491 u'ZW' : None ,
492+ u'XK' : 'Kosovo' ,
492493}
493494########## END ATHENTICATION CONFIGURATION
494495
Original file line number Diff line number Diff line change @@ -75,10 +75,12 @@ var Codeweek = window.Codeweek || {};
7575 function updateAddress ( new_latLng ) {
7676 geocoder = new google . maps . Geocoder ( ) ;
7777 geocoder . geocode ( { 'latLng' : new_latLng } , function ( results , status ) {
78- if ( status === google . maps . GeocoderStatus . OK ) {
78+ if ( status === google . maps . GeocoderStatus . OK ||
79+ ( status === google . maps . GeocoderStatus . ZERO_RESULTS && results . length > 0 ) ) {
7980 document . getElementById ( "autocomplete" ) . value = results [ 0 ] . formatted_address ;
8081 // the last item in the geocoder for latLng results array is the country
81- var country = results [ results . length - 1 ] . address_components [ 0 ] . short_name
82+ var country = results . slice ( - 1 ) [ 0 ] . address_components . slice ( - 1 ) [ 0 ] . short_name ;
83+
8284 updateCountrySelection ( country ) ;
8385 }
8486 } ) ;
Original file line number Diff line number Diff line change @@ -161,8 +161,8 @@ class SearchEventForm(forms.Form):
161161
162162 # XK is temp code for Kosovo; remove from COUNTRIES_OVERRIDE when
163163 # Kosovo gets its own ISO code and is added to django-countries
164- # if not 'Kosovo' in list(dict(countries._countries).values()):
165- # countries._countries.append((u'XK', u'Kosovo'))
164+ if not 'Kosovo' in list (dict (countries ._countries ).values ()):
165+ countries ._countries .append ((u'XK' , u'Kosovo' ))
166166
167167 search = forms .CharField (
168168 required = False ,
You can’t perform that action at this time.
0 commit comments