Skip to content

Commit

Permalink
Add method to accept only one consent type (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenjaksch authored Jan 6, 2025
1 parent c8880b3 commit c301c34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/views/components/_consent_banner.antlers.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ <h2 class="text-2xl font-bold">{{ trans:strings.consent_title }}</h2>
this.data.types.forEach((type) => type.value = true)
this.saveConsent()
},
accept(handle) {
this.data.types.filter((type) => {
return type['handle'] === handle
}).forEach((type) => type.value = true)
this.saveConsent()
},
getConsent() {
return this.data.consent
},
Expand Down

0 comments on commit c301c34

Please sign in to comment.