mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-25 01:23:23 +00:00
Fix the toggle address confirmed checkbox so the latitude/longitude gets set
Before when you checked and unchecked the checkbox it was toggling the :isConfirmed variable.
This commit is contained in:
@@ -4,7 +4,7 @@ Darkswarm.controller "RegistrationCtrl", ($scope, RegistrationService, Enterpris
|
||||
$scope.select = RegistrationService.select
|
||||
$scope.geocodedAddress = ''
|
||||
$scope.latLong = null
|
||||
$scope.addressConfirmed
|
||||
$scope.addressConfirmed = false
|
||||
$scope.steps = ['details', 'contact', 'type', 'about', 'images', 'social']
|
||||
|
||||
# Filter countries without states since the form requires a state to be selected.
|
||||
@@ -39,9 +39,9 @@ Darkswarm.controller "RegistrationCtrl", ($scope, RegistrationService, Enterpris
|
||||
$scope.map = {center: {latitude: location.lat(), longitude: location.lng()}, zoom: 16 }
|
||||
)
|
||||
|
||||
$scope.confirmAddressChange = (isConfirmed) ->
|
||||
$scope.addressConfirmed = isConfirmed
|
||||
if isConfirmed
|
||||
$scope.toggleAddressConfirmed = ->
|
||||
$scope.addressConfirmed = !$scope.addressConfirmed
|
||||
if $scope.addressConfirmed
|
||||
$scope.enterprise.address.latitude = $scope.latLong.latitude
|
||||
$scope.enterprise.address.longitude = $scope.latLong.longitude
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user