show only the enabled plugin and not only enabled and functional

This commit is contained in:
Massimo Maggioni 2022-02-11 21:41:06 +01:00
parent 3ca2e09da4
commit 081040572a

View File

@ -57,7 +57,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
<div> <div>
<button id="save-consent" class="btn save-consent" data-consentvalue="{{ range $index, $plugin := .Site.Data.gdpr.plugins }}{{ if and $plugin.functional $plugin.enabled }}{{ else }}0{{ end }}{{ end }}">Save preferences</button> <button id="save-consent" class="btn save-consent" data-consentvalue="{{ range $index, $plugin := .Site.Data.gdpr.plugins }}{{ if $plugin.enabled }}{{ else }}0{{ end }}{{ end }}">Save preferences</button>
<button class="btn approve-consent">Allow all</button> <button class="btn approve-consent">Allow all</button>
</div> </div>
</div> </div>