Privacy Policy and Terms of Service are accepted by default if privacyPolicyUrl or termsOfServiceUrl are not defined

stable
Daniel García 2018-05-29 09:58:43 +02:00 committed by Miguel Gonzalez
parent 017a80beae
commit ffec3d167b
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,9 @@ TermsOfServiceAndPrivacyPolicyNoticeDirective = ($config) ->
scope.termsOfServiceUrl = $config.get("termsOfServiceUrl")
scope.target = false
if !scope.privacyPolicyUrl || !scope.termsOfServiceUrl
scope.target = true
el.on "change", "input[name='accepted_terms']", (event) ->
target = angular.element(event.currentTarget)
scope.target = target.is(":checked")