enable child component of cookie consent control.
This commit is contained in:
@ -8,12 +8,22 @@
|
||||
{
|
||||
<form method="post" @formname="CookieConsentForm" @onsubmit="async () => await AcceptPolicy()" data-enhance>
|
||||
<input type="hidden" name="@Constants.RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
|
||||
@((MarkupString)Convert.ToString(Localizer["ConsentBody"]))
|
||||
@if (ChildContent != null)
|
||||
{
|
||||
@ChildContent
|
||||
}
|
||||
else
|
||||
{
|
||||
@((MarkupString)Convert.ToString(Localizer["ConsentBody"]))
|
||||
}
|
||||
</form>
|
||||
}
|
||||
@code {
|
||||
private bool showBanner;
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment ChildContent { get; set; } = null;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
showBanner = !(await CookieConsentService.CanTrackAsync());
|
||||
|
Reference in New Issue
Block a user