From 1e90cda3933c44b5a8d6a34d6db77bb203636f5f Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 20 Jan 2026 09:54:45 +0100 Subject: [PATCH] Add READ_AND_CONFIRM JS constant from ViewData flag Introduced a READ_AND_CONFIRM JavaScript constant in _Layout.cshtml, which reflects the server-side ViewData["ReadAndConfirm"] boolean value. This enables client-side scripts to easily check if the "ReadAndConfirm" flag is set. --- EnvelopeGenerator.Web/Views/Shared/_Layout.cshtml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EnvelopeGenerator.Web/Views/Shared/_Layout.cshtml b/EnvelopeGenerator.Web/Views/Shared/_Layout.cshtml index 42c0fcee..c033f8ad 100644 --- a/EnvelopeGenerator.Web/Views/Shared/_Layout.cshtml +++ b/EnvelopeGenerator.Web/Views/Shared/_Layout.cshtml @@ -42,6 +42,8 @@ const IS_DESKTOP_SIZE = DEVICE_SCREEN_TYPE == 'desktop' const IS_MOBILE_DEVICE = /Mobi|Android/i.test(window.navigator.userAgent); + + const READ_AND_CONFIRM = @((ViewData["ReadAndConfirm"] is bool readAndConfirm && readAndConfirm).ToString().ToLower())