Set password operational
Sitewide plan for status messages
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
<p class="center-content label label-success">@ViewBag.StatusMessage</p>
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<div class="center-content well">
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 id="log-title">@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
|
||||
@@ -10,11 +10,26 @@
|
||||
<dt>
|
||||
@Html.ViewData.ModelMetadata.DisplayName
|
||||
</dt>
|
||||
<dd @(!string.IsNullOrEmpty(color) ? "class='" + color + "'" : "") >
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<small><em>@units</em></small>
|
||||
}
|
||||
</dd>
|
||||
@if (string.IsNullOrEmpty(color))
|
||||
{
|
||||
<dd>
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<small><em>@units</em></small>
|
||||
}
|
||||
</dd>
|
||||
}
|
||||
else
|
||||
{
|
||||
<dd>
|
||||
<span class="label @Html.Encode(color)">
|
||||
@RenderBody()
|
||||
</span>
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<small><em>@units</em></small>
|
||||
}
|
||||
</dd>
|
||||
}
|
||||
</dl>
|
||||
@@ -0,0 +1,13 @@
|
||||
@if (TempData.ContainsKey("StatusMessage"))
|
||||
{
|
||||
<p class="center-content alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
@TempData["StatusMessage"]
|
||||
</p>
|
||||
} else if (ViewBag.StatusMessage != null)
|
||||
{
|
||||
<p class="center-content alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
@ViewBag.StatusMessage
|
||||
</p>
|
||||
}
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
@{ Html.RenderPartial("BackToUsers"); }
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
<div class="center-content well">
|
||||
@@ -31,11 +33,6 @@
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@Html.DisplayFor(m => m.IsLockedOut)
|
||||
@if (Model.IsLockedOut) {
|
||||
@Html.DisplayFor(m => m.LastLockoutDate)
|
||||
}
|
||||
|
||||
<dl class="dl-horizontal lastActivity">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(m => m.LastActivityDate)
|
||||
@@ -52,9 +49,15 @@
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@if (Model.IsLockedOut) {
|
||||
<p class="alert alert-info">
|
||||
Locked out on @Html.DisplayTextFor(m => m.LastLockoutDate)
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="btn-toolbar center-content">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId }, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model MileageTraker.Web.Models.User
|
||||
@model MileageTraker.Web.ViewModels.User.EditUserViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit User";
|
||||
@@ -16,9 +16,14 @@
|
||||
<legend></legend>
|
||||
|
||||
@Html.EditorForModel()
|
||||
@Html.Partial("_Roles", Model)
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
<div class="btn-toolbar center-content">
|
||||
@Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId }, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
ViewBag.Title = "Users";
|
||||
var grid = new WebGrid(Model, rowsPerPage: 45);
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 id="user-title">@ViewBag.Title</h2>
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
@model MileageTraker.Web.ViewModels.User.SetPasswordViewModel
|
||||
@{
|
||||
ViewBag.Title = "Change Password";
|
||||
}
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("SetPassword", "User", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
@Html.AntiForgeryToken()
|
||||
<fieldset>
|
||||
<legend>Set password for @Model.Username</legend>
|
||||
@Html.EditorForModel()
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Change password" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@model MileageTraker.Web.ViewModels.User.CreateUserViewModel
|
||||
@model MileageTraker.Web.ViewModels.User.RolesViewModel
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
@{ Html.RenderPartial("BackToVehicles"); }
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 id="vehicle-title">@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
|
||||
Reference in New Issue
Block a user