From 729ffc869b0621c741f6be8b8ba2cd4f8e8ca9fa Mon Sep 17 00:00:00 2001 From: Qais Yousuf Date: Thu, 21 Mar 2024 16:19:27 +0100 Subject: [PATCH] save and edit functionlity is enabled for the questionnaire --- .../Admin/Views/Questionnaire/Edit.cshtml | 110 +++++++++++++----- .../Admin/Views/Questionnaire/Index.cshtml | 2 +- 2 files changed, 79 insertions(+), 33 deletions(-) diff --git a/Web/Areas/Admin/Views/Questionnaire/Edit.cshtml b/Web/Areas/Admin/Views/Questionnaire/Edit.cshtml index 85ef9bc..a2c16f8 100644 --- a/Web/Areas/Admin/Views/Questionnaire/Edit.cshtml +++ b/Web/Areas/Admin/Views/Questionnaire/Edit.cshtml @@ -3,7 +3,27 @@ @{ ViewData["Title"] = "Edit"; } +
@@ -22,51 +42,53 @@
-
+
@for (int i = 0; i < Model.Questions.Count; i++) { +
-
- - - +
+ @Model.Questions[i].Text +
-
- - - -
-
- @for (int j = 0; j < Model.Questions[i].Answers.Count; j++) - { -
- -
- - - - + +
- - +
} -
- - | Back to list -
@@ -75,6 +97,10 @@ + + + + @section Scripts { @@ -118,7 +164,7 @@ @* this script is working for adding mutiple answers for a question *@ - @* - *@ + +} *@ } - diff --git a/Web/Areas/Admin/Views/Questionnaire/Index.cshtml b/Web/Areas/Admin/Views/Questionnaire/Index.cshtml index 2506143..63dfb0a 100644 --- a/Web/Areas/Admin/Views/Questionnaire/Index.cshtml +++ b/Web/Areas/Admin/Views/Questionnaire/Index.cshtml @@ -65,7 +65,7 @@ Delete | - Edit| + Edit| Details