Added a signature legal agreement warning and integrated the resource file (resx) as a JavaScript object into the _Layout.cshtml file. This enables the agreement warning to support multiple languages.
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
@using DigitalData.Core.API
|
||||
@using Newtonsoft.Json
|
||||
@{
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@@ -24,6 +29,13 @@
|
||||
<script src="~/js/util.js" asp-append-version="true"></script>
|
||||
<script src="~/js/api.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
@{
|
||||
var lStrsJson = JsonConvert.SerializeObject(_localizer.ToDictionary()).TrySanitize(_sanitizer);
|
||||
}
|
||||
<script nonce="@nonce">
|
||||
var localized = @Html.Raw(lStrsJson)
|
||||
</script>
|
||||
|
||||
<main role="main">
|
||||
<partial name="_CookieConsentPartial" />
|
||||
@RenderBody()
|
||||
|
||||
Reference in New Issue
Block a user