From dc9a1f1b9cd032e2f23a9fc3fcb6b4ad6b3117c1 Mon Sep 17 00:00:00 2001 From: franc Date: Mon, 5 May 2025 17:10:05 +0200 Subject: [PATCH] Move script section stuff that is implementet on more than one script section on layout --- .../Views/Recipe/RemoveIngredient.cshtml | 3 --- .../Views/Shared/_GetInstructions.cshtml | 6 +----- .../Views/Shared/_IngredientsPartial.cshtml | 6 +----- .../Views/Shared/_Layout.cshtml | 17 +++++++++++++---- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Francesco.Recipes.World/Views/Recipe/RemoveIngredient.cshtml b/Francesco.Recipes.World/Views/Recipe/RemoveIngredient.cshtml index ca32396..6e868fd 100644 --- a/Francesco.Recipes.World/Views/Recipe/RemoveIngredient.cshtml +++ b/Francesco.Recipes.World/Views/Recipe/RemoveIngredient.cshtml @@ -18,6 +18,3 @@ -@section Scripts { - @await Html.PartialAsync("_ValidationScriptsPartial") -} diff --git a/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml b/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml index aa05493..206818b 100644 --- a/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml +++ b/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml @@ -35,8 +35,4 @@ -@section Scripts { - -} + diff --git a/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml b/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml index 98670c5..ee780e2 100644 --- a/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml +++ b/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml @@ -28,8 +28,4 @@ -@section Scripts { - -} + diff --git a/Francesco.Recipes.World/Views/Shared/_Layout.cshtml b/Francesco.Recipes.World/Views/Shared/_Layout.cshtml index dace8db..463da8d 100644 --- a/Francesco.Recipes.World/Views/Shared/_Layout.cshtml +++ b/Francesco.Recipes.World/Views/Shared/_Layout.cshtml @@ -63,7 +63,16 @@ - - + @await Html.PartialAsync("_ValidationScriptsPartial") @await RenderSectionAsync("Scripts", required: false)