Skip to content

Commit

Permalink
fix unwanted alert list marker for single error, issue btcpayserver#3583
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPaz committed May 2, 2022
1 parent 273bc78 commit ee1bd44
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 43 deletions.
94 changes: 51 additions & 43 deletions BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml
Expand Up @@ -90,49 +90,57 @@
<partial name="_StatusMessage" model="@(new ViewDataDictionary(ViewData){ { "Margin", "mb-4" } })" />
@if (!ViewContext.ModelState.IsValid)
{
@Html.ValidationSummary(string.Empty, new { @class = "alert alert-danger mb-4 pb-0 text-center" })
@if (ViewContext.ModelState.ErrorCount.Equals(1))
{
@Html.ValidationSummary(string.Empty, new { @class = "alert alert-danger mb-4 pb-0 text-center no-marker" })
}
else
{
@Html.ValidationSummary(string.Empty, new { @class = "alert alert-danger mb-4 pb-0 text-center" })
}
}
<div class="row">
<div class="col col-12 col-lg-6 mb-4">
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
@if (!Model.Title.IsNullOrWhiteSpace())
{
<h2 class="h4 mb-3">@Model.Title</h2>
}
<div class="d-flex align-items-center">
<span class="text-muted text-nowrap">Start Date</span>
&nbsp;
<span class="text-nowrap">@Model.StartDate.ToString("g")</span>
</div>
<div class="d-flex align-items-center">
<span class="text-muted text-nowrap">Last Updated</span>
&nbsp;
<span class="text-nowrap">@Model.LastRefreshed.ToString("g")</span>
<button type="button" class="btn btn-link fw-semibold d-none d-lg-inline-block d-print-none border-0 p-0 ms-4 only-for-js" id="copyLink">
Copy Link
</button>

<div class="row">
<div class="col col-12 col-lg-6 mb-4">
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
@if (!Model.Title.IsNullOrWhiteSpace())
{
<h2 class="h4 mb-3">@Model.Title</h2>
}
<div class="d-flex align-items-center">
<span class="text-muted text-nowrap">Start Date</span>
&nbsp;
<span class="text-nowrap">@Model.StartDate.ToString("g")</span>
</div>
<div class="d-flex align-items-center">
<span class="text-muted text-nowrap">Last Updated</span>
&nbsp;
<span class="text-nowrap">@Model.LastRefreshed.ToString("g")</span>
<button type="button" class="btn btn-link fw-semibold d-none d-lg-inline-block d-print-none border-0 p-0 ms-4 only-for-js" id="copyLink">
Copy Link
</button>
</div>
@if (!string.IsNullOrEmpty(Model.ResetIn))
{
<p>
<span class="text-muted text-nowrap">Reset in</span>
&nbsp;
<span class="text-nowrap">@Model.ResetIn</span>
</p>
}
@if (!string.IsNullOrEmpty(Model.Description))
{
<div class="mt-4">@Safe.Raw(Model.Description)</div>
}
</div>
</div>
@if (!string.IsNullOrEmpty(Model.ResetIn))
{
<p>
<span class="text-muted text-nowrap">Reset in</span>
&nbsp;
<span class="text-nowrap">@Model.ResetIn</span>
</p>
}
@if (!string.IsNullOrEmpty(Model.Description))
{
<div class="mt-4">@Safe.Raw(Model.Description)</div>
}
</div>
</div>
<div class="col col-12 col-lg-6 mb-4">
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
<h2 class="h4 mb-3">Payment Details</h2>
<dl class="mb-0 mt-md-4">
<div class="d-flex d-print-inline-block flex-column mb-4 me-5">
<dt class="h4 fw-semibold text-nowrap text-primary text-print-default order-2 order-sm-1 mb-1">@Model.AmountDueFormatted</dt>
<dd class="order-1 order-sm-2 mb-1">Available claim</dd>
<div class="col col-12 col-lg-6 mb-4">
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
<h2 class="h4 mb-3">Payment Details</h2>
<dl class="mb-0 mt-md-4">
<div class="d-flex d-print-inline-block flex-column mb-4 me-5">
<dt class="h4 fw-semibold text-nowrap text-primary text-print-default order-2 order-sm-1 mb-1">@Model.AmountDueFormatted</dt>
<dd class="order-1 order-sm-2 mb-1">Available claim</dd>
</div>
<div class="progress bg-light d-none d-sm-flex mb-sm-4 d-print-none" style="height:5px">
<div class="progress-bar bg-primary" role="progressbar" style="width:@((Model.AmountCollected / Model.Amount) * 100)%"></div>
Expand All @@ -145,10 +153,10 @@
<dt class="h4 text-sm-end fw-semibold text-nowrap order-2 order-sm-1 mb-1">@Model.AmountFormatted</dt>
<dd class="text-sm-end order-1 order-sm-2 mb-1">Claim limit</dd>
</div>
</dl>
</dl>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="bg-tile h-100 m-0 p-3 p-sm-5 rounded">
Expand Down
3 changes: 3 additions & 0 deletions BTCPayServer/wwwroot/main/site.css
Expand Up @@ -418,3 +418,6 @@ svg.icon-note {
}
}

.no-marker > ul {
list-style-type: none;
}

0 comments on commit ee1bd44

Please sign in to comment.