From 7587e7fd1792410b4f4c0c28b367efd72ca91a41 Mon Sep 17 00:00:00 2001 From: Anatolii Grynchuk Date: Sat, 2 May 2026 03:43:25 +0300 Subject: [PATCH] fix: move test modal to view body, wire button via addEventListener Razor section forwarding across nested layouts is unreliable. Modal div and script are now directly in Edit.cshtml body (not in any section) so they are always in the DOM when the page renders. Button uses addEventListener instead of inline onclick to decouple from layout rendering order. Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Views/AdminChannels/Edit.cshtml | 110 +++++++++--------- .../Views/Shared/_EditorLayout.cshtml | 4 - 2 files changed, 56 insertions(+), 58 deletions(-) diff --git a/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml b/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml index 7f6dff5..afebd85 100644 --- a/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml +++ b/HrynCo.NotificationService.Web/Views/AdminChannels/Edit.cshtml @@ -123,7 +123,7 @@ @if (!Model.IsNew) { - } @@ -135,64 +135,66 @@ @if (!Model.IsNew) { - @section Scripts { - - -@section Scripts { - @RenderSection("Scripts", required: false) -}