From 6bac8563bf13f431a00938e0125b139555db4f48 Mon Sep 17 00:00:00 2001
From: Dan <daniel2.lorych@live.uwe.ac.uk>
Date: Sun, 1 May 2022 19:56:30 +0100
Subject: [PATCH] Add Configurator index page

---
 Helios/Views/Configurator/Index.cshtml | 61 ++++++++++++++++++++++++++
 Helios/Views/Shared/_Layout.cshtml     |  2 +-
 2 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 Helios/Views/Configurator/Index.cshtml

diff --git a/Helios/Views/Configurator/Index.cshtml b/Helios/Views/Configurator/Index.cshtml
new file mode 100644
index 0000000..e95c488
--- /dev/null
+++ b/Helios/Views/Configurator/Index.cshtml
@@ -0,0 +1,61 @@
+@model Helios.Models.ConfiguratorInput
+
+@{
+    ViewData["Title"] = "Configuration Page";
+}
+
+@using (Html.BeginForm(actionName: "SubmitSystem", controllerName: "Configurator", Model))
+{
+<div class="form-horizontal">
+    <h4>Configurator Input</h4>
+    <hr />
+
+    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
+
+    <div class="form-group">
+        @Html.LabelFor(model => model.Roof.Area, htmlAttributes: new { @class = "control-label col-md-2" })
+        <div class="col-md-10">
+            @Html.EditorFor(model => model.Roof.Area, new { htmlAttributes = new { @class = "form-control" } })
+            @Html.ValidationMessageFor(model => model.Roof.Area, "", new { @class = "text-danger" })
+        </div>
+    </div>
+
+    <div class="form-group">
+        @Html.LabelFor(model => model.Roof.Elevation, htmlAttributes: new { @class = "control-label col-md-2" })
+        <div class="col-md-10">
+            @Html.EditorFor(model => model.Roof.Elevation, new { htmlAttributes = new { @class = "form-control" } })
+            @Html.ValidationMessageFor(model => model.Roof.Elevation, "", new { @class = "text-danger" })
+        </div>
+    </div>
+
+    <div class="form-group">
+        @Html.LabelFor(model => model.PowerRequired, htmlAttributes: new { @class = "control-label col-md-2" })
+        <div class="col-md-10">
+            @Html.EditorFor(model => model.PowerRequired, new { htmlAttributes = new { @class = "form-control" } })
+            @Html.ValidationMessageFor(model => model.PowerRequired, "", new { @class = "text-danger" })
+        </div>
+    </div>
+
+    <div class="form-group">
+        @Html.LabelFor(model => model.MaximumPower, htmlAttributes: new { @class = "control-label col-md-2" })
+        <div class="col-md-10">
+            @Html.EditorFor(model => model.MaximumPower, new { htmlAttributes = new { @class = "form-control" } })
+            @Html.ValidationMessageFor(model => model.MaximumPower, "", new { @class = "text-danger" })
+        </div>
+    </div>
+
+    <div class="form-group">
+        @Html.LabelFor(model => model.Budget, htmlAttributes: new { @class = "control-label col-md-2" })
+        <div class="col-md-10">
+            @Html.EditorFor(model => model.Budget, new { htmlAttributes = new { @class = "form-control" } })
+            @Html.ValidationMessageFor(model => model.Budget, "", new { @class = "text-danger" })
+        </div>
+    </div>
+
+    <div class="form-group">
+        <div class="col-md-offset-2 col-md-10">
+            <input type="submit" value="Create" class="btn btn-default" />
+        </div>
+    </div>
+</div>
+}
\ No newline at end of file
diff --git a/Helios/Views/Shared/_Layout.cshtml b/Helios/Views/Shared/_Layout.cshtml
index 7727b3c..671b774 100644
--- a/Helios/Views/Shared/_Layout.cshtml
+++ b/Helios/Views/Shared/_Layout.cshtml
@@ -26,7 +26,7 @@
                             <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="About">About</a>
                         </li>
                         <li class="nav-item">
-                            <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Services">Services</a>
+                            <a class="nav-link text-dark" asp-area="" asp-controller="Configurator" asp-action="Index">Services</a>
                         </li>
                         <li class="nav-item">
                             <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="System Analysis">System Analysis</a>
-- 
GitLab