Style center content for forms

This commit is contained in:
2012-12-28 15:45:23 -05:00
parent 7eff2f343a
commit ce6fd9c215
23 changed files with 197 additions and 137 deletions
+11 -11
View File
@@ -8,13 +8,17 @@
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
}
<h2 class="center-content">@ViewBag.Title</h2>
<p class="alert center-content">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
@* ReSharper disable Mvc.ActionNotResolved *@
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post))
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post, new { @class = "form-horizontal well center-content" } ))
{
@* ReSharper restore Mvc.ActionNotResolved *@
<fieldset>
<legend>@ViewBag.Title</legend>
<p class="alert">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
<legend></legend>
@if (Model.Miles == 0)
{
<p class="alert"><span class="label label-warning">Warning</span> No mileage being logged - <strong>is this a duplicate?</strong></p>
@@ -95,14 +99,10 @@
</dl>
@Html.HiddenFor(model => model.Date)
<dl class="dl-horizontal">
<dt>
<input type="submit" name="Edit" value="Back" class="btn" />
</dt>
<dd>
<input type="submit" name="Confirm" value="Confirm" class="btn btn-primary" />
</dd>
</dl>
<div class="form-actions">
<input type="submit" name="Confirm" value="Confirm" class="btn btn-primary" />
<input type="submit" name="Edit" value="Back" class="btn" />
</div>
</fieldset>
}
+6 -6
View File
@@ -4,16 +4,16 @@
ViewBag.Title = "Enter Mileage Log";
}
@using (Html.BeginForm("Index", "CreateLog", FormMethod.Post, new { @class = "form-horizontal" }))
<h2 class="center-content">@ViewBag.Title</h2>
@using (Html.BeginForm("Index", "CreateLog", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
{
<fieldset>
<legend>@ViewBag.Title</legend>
<legend></legend>
@Html.Partial("_ValidationSummary")
@Html.EditorForModel()
<div class="control-group">
<div class="controls">
<input type="submit" value="Submit" class="btn btn-primary" />
</div>
<div class="form-actions">
<input type="submit" value="Submit" class="btn btn-primary" />
</div>
</fieldset>
}
+12 -14
View File
@@ -1,19 +1,17 @@
@model MileageTraker.Web.ViewModels.CreateLog.CreateLogViewModel
@{
ViewBag.Title = "Success";
}
@{
<h4>@ViewBag.Title</h4>
<p>
You've successfully created an entry
for <strong>@Html.DisplayTextFor(m => m.EmployeeName)</strong>
traveling to <strong>@Html.DisplayTextFor(m => m.CityName)</strong>
on <strong>@Html.Encode(Model.Date.ToShortDateString())</strong>
in Vehicle Id <strong>@Html.DisplayTextFor(m => m.VehicleId)</strong>
</p>
<p>
@Html.ActionLink("Create another", "Index", null, new { @class = "btn" })
</p>
}
<p class="alert alert-success center-content">
You've successfully created an entry
for <strong>@Html.DisplayTextFor(m => m.EmployeeName)</strong>
traveling to <strong>@Html.DisplayTextFor(m => m.CityName)</strong>
on <strong>@Html.Encode(Model.Date.ToShortDateString())</strong>
in Vehicle Id <strong>@Html.DisplayTextFor(m => m.VehicleId)</strong>
ending in <strong>@Html.DisplayTextFor(m => m.EndOdometer)</strong>
miles on the odometer.
</p>
<p class="center-content">
@Html.ActionLink("Create another", "Index", null, new { @class = "btn" })
</p>