diff --git a/Web/Views/Log/Index.cshtml b/Web/Views/Log/Index.cshtml
index 79c12dc..0c83779 100644
--- a/Web/Views/Log/Index.cshtml
+++ b/Web/Views/Log/Index.cshtml
@@ -9,6 +9,8 @@
diff --git a/Web/Views/Shared/DisplayTemplates/_FieldLayout.cshtml b/Web/Views/Shared/DisplayTemplates/_FieldLayout.cshtml
index 783f821..979c6ca 100644
--- a/Web/Views/Shared/DisplayTemplates/_FieldLayout.cshtml
+++ b/Web/Views/Shared/DisplayTemplates/_FieldLayout.cshtml
@@ -10,11 +10,26 @@
@Html.ViewData.ModelMetadata.DisplayName
-
- @RenderBody()
- @if (!string.IsNullOrEmpty(units))
- {
- @units
- }
-
+ @if (string.IsNullOrEmpty(color))
+ {
+
+ @RenderBody()
+ @if (!string.IsNullOrEmpty(units))
+ {
+ @units
+ }
+
+ }
+ else
+ {
+
+
+ @RenderBody()
+
+ @if (!string.IsNullOrEmpty(units))
+ {
+ @units
+ }
+
+ }
\ No newline at end of file
diff --git a/Web/Views/Shared/_StatusMessage.cshtml b/Web/Views/Shared/_StatusMessage.cshtml
new file mode 100644
index 0000000..1d4bd2b
--- /dev/null
+++ b/Web/Views/Shared/_StatusMessage.cshtml
@@ -0,0 +1,13 @@
+@if (TempData.ContainsKey("StatusMessage"))
+{
+
+ ×
+ @TempData["StatusMessage"]
+
+} else if (ViewBag.StatusMessage != null)
+{
+
+ ×
+ @ViewBag.StatusMessage
+
+}
diff --git a/Web/Views/User/Details.cshtml b/Web/Views/User/Details.cshtml
index c79572b..6c3acc3 100644
--- a/Web/Views/User/Details.cshtml
+++ b/Web/Views/User/Details.cshtml
@@ -7,6 +7,8 @@
@{ Html.RenderPartial("BackToUsers"); }
+@Html.Partial("_StatusMessage")
+
@ViewBag.Title
@@ -31,11 +33,6 @@
- @Html.DisplayFor(m => m.IsLockedOut)
- @if (Model.IsLockedOut) {
- @Html.DisplayFor(m => m.LastLockoutDate)
- }
-
@Html.DisplayNameFor(m => m.LastActivityDate)
@@ -52,9 +49,15 @@
}
-
+
+ @if (Model.IsLockedOut) {
+
+ Locked out on @Html.DisplayTextFor(m => m.LastLockoutDate)
+
+ }
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
+ @Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId }, new { @class = "btn" })
diff --git a/Web/Views/User/Edit.cshtml b/Web/Views/User/Edit.cshtml
index 6816876..64c2dd1 100644
--- a/Web/Views/User/Edit.cshtml
+++ b/Web/Views/User/Edit.cshtml
@@ -1,4 +1,4 @@
-@model MileageTraker.Web.Models.User
+@model MileageTraker.Web.ViewModels.User.EditUserViewModel
@{
ViewBag.Title = "Edit User";
@@ -16,9 +16,14 @@
@Html.EditorForModel()
+ @Html.Partial("_Roles", Model)
}
+
+
+ @Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId }, new { @class = "btn" })
+
diff --git a/Web/Views/User/Index.cshtml b/Web/Views/User/Index.cshtml
index fb2ffdc..f67d01b 100644
--- a/Web/Views/User/Index.cshtml
+++ b/Web/Views/User/Index.cshtml
@@ -5,6 +5,8 @@
ViewBag.Title = "Users";
var grid = new WebGrid(Model, rowsPerPage: 45);
}
+
+@Html.Partial("_StatusMessage")
@ViewBag.Title
diff --git a/Web/Views/User/SetPassword.cshtml b/Web/Views/User/SetPassword.cshtml
new file mode 100644
index 0000000..ec4f9af
--- /dev/null
+++ b/Web/Views/User/SetPassword.cshtml
@@ -0,0 +1,19 @@
+@model MileageTraker.Web.ViewModels.User.SetPasswordViewModel
+@{
+ ViewBag.Title = "Change Password";
+}
+
+
@ViewBag.Title
+
+@using (Html.BeginForm("SetPassword", "User", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
+{
+ @Html.Partial("_ValidationSummary")
+ @Html.AntiForgeryToken()
+
+ Set password for @Model.Username
+ @Html.EditorForModel()
+
+
+
+
+}
diff --git a/Web/Views/Shared/_Roles.cshtml b/Web/Views/User/_Roles.cshtml
similarity index 74%
rename from Web/Views/Shared/_Roles.cshtml
rename to Web/Views/User/_Roles.cshtml
index 44edcc5..c714225 100644
--- a/Web/Views/Shared/_Roles.cshtml
+++ b/Web/Views/User/_Roles.cshtml
@@ -1,4 +1,4 @@
-@model MileageTraker.Web.ViewModels.User.CreateUserViewModel
+@model MileageTraker.Web.ViewModels.User.RolesViewModel
@{
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
}
diff --git a/Web/Views/Vehicle/Details.cshtml b/Web/Views/Vehicle/Details.cshtml
index 7387aa8..9769e1b 100644
--- a/Web/Views/Vehicle/Details.cshtml
+++ b/Web/Views/Vehicle/Details.cshtml
@@ -8,6 +8,8 @@
}
+@Html.Partial("_StatusMessage")
+
@{ Html.RenderPartial("BackToVehicles"); }
@ViewBag.Title
diff --git a/Web/Views/Vehicle/Index.cshtml b/Web/Views/Vehicle/Index.cshtml
index c994324..6fe8807 100644
--- a/Web/Views/Vehicle/Index.cshtml
+++ b/Web/Views/Vehicle/Index.cshtml
@@ -8,6 +8,8 @@
}
+@Html.Partial("_StatusMessage")
+
@ViewBag.Title
diff --git a/Web/Web.csproj b/Web/Web.csproj
index 4bd80d4..fe772f2 100644
--- a/Web/Web.csproj
+++ b/Web/Web.csproj
@@ -147,8 +147,10 @@
+
-
+
+
@@ -273,7 +275,9 @@
-
+
+
+