Commit 102f3614 authored by Steve Sanderson's avatar Steve Sanderson Committed by Ryan Nowak
Browse files

Simplify CSS classes on ConfigurePizzaDialog

parent dba35a54
......@@ -8,48 +8,36 @@
@Pizza.Special.Description
</div>
<form class="dialog-body">
<div class="row form-group">
<label class="col-md-4 col-form-label">Size:</label>
<div class="col-md-6">
<input type="range" class="form-control-range" min="@Pizza.MinimumSize" max="@Pizza.MaximumSize" step="1" bind="Pizza.Size"/>
</div>
<div class="col-md-2">
<label>@(Pizza.Size)" £@(Pizza.GetFormattedTotalPrice())</label>
</div>
<div>
<label>Size:</label>
<input type="range" min="@Pizza.MinimumSize" max="@Pizza.MaximumSize" step="1" bind="Pizza.Size" />
<span class="size-label">
@(Pizza.Size)" (£@(Pizza.GetFormattedTotalPrice()))
</span>
</div>
@if (AllToppings == null)
{
<div class="row form-group">
<label class="col-md-4 col-form-label">Extra Toppings:</label>
<div class="col-md-8">
<select class="custom-select mr-sm-2">
<option value="-1" disabled selected>(loading...)</option>
</select>
</div>
</div>
}
else
{
<div class="row form-group">
<label class="col-md-4 col-form-label">Extra Toppings:</label>
<div class="col-md-8">
@if (Pizza.Toppings.Count < 6)
{
<select class="custom-select mr-sm-2" onchange="@ToppingSelected">
<option value="-1" disabled selected>(select)</option>
@for (var i = 0; i < AllToppings.Count; i++)
{
<option value="@i">@AllToppings[i].Name - (£@(AllToppings[i].GetFormattedPrice()))</option>
}
</select>
}
else
<div>
<label>Extra Toppings:</label>
@if (AllToppings == null)
{
<select class="custom-select" disabled>
<option>(loading...)</option>
</select>
}
else if (Pizza.Toppings.Count >= 6)
{
<div>(maximum reached)</div>
}
else
{
<select class="custom-select" onchange="@ToppingSelected">
<option value="-1" disabled selected>(select)</option>
@for (var i = 0; i < AllToppings.Count; i++)
{
<div class="form-message">(maximum reached)</div>
<option value="@i">@AllToppings[i].Name - (£@(AllToppings[i].GetFormattedPrice()))</option>
}
</div>
</div>
}
</select>
}
</div>
<div class="toppings">
@foreach (var topping in Pizza.Toppings)
......@@ -63,7 +51,7 @@
</div>
</form>
<div class="dialog-buttons px-4">
<div class="dialog-buttons">
<button class="btn btn-secondary mr-auto" onclick="@OrderState.CancelConfigurePizzaDialog">Cancel</button>
<span class="mr-center">
Price: <span class="price">@(Pizza.GetFormattedTotalPrice())</span>
......
......@@ -356,7 +356,7 @@ form {
.dialog-body {
flex-grow: 1;
padding: 1rem 3rem 1rem 0;
padding: 0.5rem 3rem 1rem 0;
}
.dialog-buttons {
......@@ -365,11 +365,34 @@ form {
display: flex;
align-items: center;
background-color: #eee;
padding: 0 1rem;
}
.dialog-body > div {
display: flex;
margin-top: 1rem;
align-items: center;
}
.dialog-body label {
text-align: right;
width: 200px;
margin: 0 1.5rem;
}
.dialog-body input, .dialog-body select {
flex-grow: 1;
width: unset;
}
.dialog-body .size-label {
margin-left: 2rem;
}
.dialog .toppings {
padding-left: 4rem;
text-align: center;
display: block;
padding-left: 4rem;
}
.dialog .topping {
......@@ -378,7 +401,7 @@ form {
color: white;
padding: 0.2rem 1rem;
border-radius: 2rem;
margin: 0 0.6rem 0.8rem 0;
margin: 0.4rem 0.3rem;
font-weight: 700;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment