Add style to edit and delete in category view

This commit is contained in:
Damian Lasecki 2018-12-19 21:12:04 +01:00
parent 15830cf648
commit fd836b41b5
4 changed files with 147 additions and 135 deletions

View File

@ -302,75 +302,85 @@ textarea {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.delete-category__span{
font-size:2rem;
font-weight:400;
margin-bottom:10rem;
}
.delete-category__dl {
height: 3rem;
@media (min-width: 768px) { margin-bottom: 3rem;
.navbar > .container {
height: 10rem;
}
.navbar-header {
height: 100%;
display: flex;
align-items: center;
}
.navbar-brand {
font-size: 3.5rem;
}
.navbar-nav {
height: 100px;
display: flex;
align-items: center;
}
.navbar-nav > li {
height: 50%;
}
.navbar-nav > li > a {
height: 100%;
border-radius: 0.8rem;
}
.nav > li > a:hover, .nav > li > a:focus {
transition: background-color .1s ease;
}
.category-list {
grid-template-columns: 1fr 1fr;
grid-column-gap: 2rem;
}
.single-category-wrapper {
width: 65%;
margin: 0 auto;
}
.form-AddQuestion__btn {
flex-direction: row;
margin-top: 1rem;
}
.form-personal-data{
flex-direction: row;
}
.form-personal-data .form-group {
width: 49%;
}
.form-AddQuestion input[type=submit] {
margin-top:0;
}
} }
@media (min-width: 768px) {
.navbar > .container {
height: 10rem;
}
.navbar-header {
height: 100%;
display: flex;
align-items: center;
}
.navbar-brand {
font-size: 3.5rem;
}
.navbar-nav {
height: 100px;
display: flex;
align-items: center;
}
.navbar-nav > li {
height: 50%;
}
.navbar-nav > li > a {
height: 100%;
border-radius: 0.8rem;
}
.nav > li > a:hover, .nav > li > a:focus {
transition: background-color .1s ease;
}
.category-list {
grid-template-columns: 1fr 1fr;
grid-column-gap: 2rem;
}
.single-category-wrapper {
width: 65%;
margin: 0 auto;
}
.form-AddQuestion__btn {
flex-direction: row;
margin-top: 1rem;
}
.form-personal-data {
flex-direction: row;
}
.form-personal-data .form-group {
width: 49%;
}
.form-AddQuestion input[type=submit] {
margin-top: 0;
}
}

View File

@ -4,29 +4,31 @@
ViewBag.Title = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <div class="single-category-wrapper">
<h2>Usuwanie ketegorii</h2>
<hr style="border-top: 1px solid #d3d3d3;" />
<h3>Are you sure you want to delete this?</h3> <span class="delete-category__span">Jesteś pewien, że chcesz usunąć kategorię?</span>
<div> <div style="margin-top: 3rem;">
<h4>Category</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.CategoryName)
</dt>
<dd> <dl class="dl-horizontal delete-category__dl">
@Html.DisplayFor(model => model.CategoryName) <dt style="text-align:left">
</dd> @Html.DisplayNameFor(model => model.CategoryName)
</dt>
<dd style="margin-left:0;">
@Html.DisplayFor(model => model.CategoryName)
</dd>
</dl>
</dl> @using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@using (Html.BeginForm()) { <div class="form-actions no-color">
@Html.AntiForgeryToken() <input type="submit" value="Usuń" class="answer-list__add-btn" style="height:4rem; width:17rem; background-color:#af4f4f; margin-bottom: 3rem;" />
</div>
<div class="form-actions no-color"> <div>@Html.ActionLink("Powrót do listy kategorii", "Index")
<input type="submit" value="Delete" class="btn btn-default" /> | </div>
@Html.ActionLink("Back to List", "Index") }
</div> </div>
} </div>
</div>

View File

@ -4,39 +4,39 @@
ViewBag.Title = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <div class="single-category-wrapper">
<h2>Edytuj nazwię kategorii</h2>
<hr style="border-top: 1px solid #d3d3d3; margin-bottom: 3rem;" />
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal"> @using (Html.BeginForm())
<h4>Category</h4> {
<hr /> @Html.AntiForgeryToken()
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.Id)
<div class="form-group"> <div class="form-horizontal">
@Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10"> @Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } }) @Html.HiddenFor(model => model.Id)
@Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" }) <div class="form-group">
</div> @Html.LabelFor(model => model.CategoryName, htmlAttributes: new { @class = "control-label col-md-2" })
</div> <div class="col-md-10">
@Html.EditorFor(model => model.CategoryName, new { htmlAttributes = new { @class = "form-control" } })
<div class="form-group"> @Html.ValidationMessageFor(model => model.CategoryName, "", new { @class = "text-danger" })
<div class="col-md-offset-2 col-md-10"> </div>
<input type="submit" value="Save" class="btn btn-default" /> </div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Zapisz" class="answer-list__add-btn" style="height:4rem; width:17rem" />
</div>
</div> </div>
</div> </div>
}
<div>
@Html.ActionLink("Powrót do listy kategorii", "Index")
</div> </div>
} </div>
@section Scripts {
<div> @Scripts.Render("~/bundles/jqueryval")
@Html.ActionLink("Back to List", "Index") }
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}