mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Update Payment Request View (#3259)
* removes "back to list" * changes currency label + formats currency and amount * adjust sizing * Wording: Create and Save button * Improve search responsive behaviour Co-authored-by: Dennis Reimann <mail@dennisreimann.de> Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ namespace BTCPayServer.Models.PaymentRequestViewModels
|
|||||||
[Range(double.Epsilon, double.PositiveInfinity, ErrorMessage = "Please provide an amount greater than 0")]
|
[Range(double.Epsilon, double.PositiveInfinity, ErrorMessage = "Please provide an amount greater than 0")]
|
||||||
public decimal Amount { get; set; }
|
public decimal Amount { get; set; }
|
||||||
|
|
||||||
[Display(Name = "The currency used for payment request. (e.g. BTC, LTC, USD, etc.)")]
|
[Display(Name = "Currency")]
|
||||||
public string Currency { get; set; }
|
public string Currency { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Expiration Date")]
|
[Display(Name = "Expiration Date")]
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
<input asp-for="Title" class="form-control" required />
|
<input asp-for="Title" class="form-control" required />
|
||||||
<span asp-validation-for="Title" class="text-danger"></span>
|
<span asp-validation-for="Title" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="d-flex justify-content-between">
|
||||||
|
<div class="form-group flex-fill me-4">
|
||||||
<label asp-for="Amount" class="form-label" data-required></label>
|
<label asp-for="Amount" class="form-label" data-required></label>
|
||||||
<input type="number" step="any" asp-for="Amount" class="form-control" required />
|
<input type="number" step="any" asp-for="Amount" class="form-control" required />
|
||||||
<span asp-validation-for="Amount" class="text-danger"></span>
|
<span asp-validation-for="Amount" class="text-danger"></span>
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
<input asp-for="Currency" class="form-control" />
|
<input asp-for="Currency" class="form-control" />
|
||||||
<span asp-validation-for="Currency" class="text-danger"></span>
|
<span asp-validation-for="Currency" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group form-check">
|
<div class="form-group form-check">
|
||||||
<input asp-for="AllowCustomPaymentAmounts" type="checkbox" class="form-check-input" />
|
<input asp-for="AllowCustomPaymentAmounts" type="checkbox" class="form-check-input" />
|
||||||
<label asp-for="AllowCustomPaymentAmounts" class="form-check-label"></label>
|
<label asp-for="AllowCustomPaymentAmounts" class="form-check-label"></label>
|
||||||
@@ -101,7 +102,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mt-4">
|
<div class="form-group mt-4">
|
||||||
<button type="submit" class="btn btn-primary" id="SaveButton">Save</button>
|
<button type="submit" class="btn btn-primary" id="SaveButton">
|
||||||
|
@(string.IsNullOrEmpty(Model.Id) ? "Create" : "Save")
|
||||||
|
</button>
|
||||||
@if (!string.IsNullOrEmpty(Model.Id))
|
@if (!string.IsNullOrEmpty(Model.Id))
|
||||||
{
|
{
|
||||||
<a class="btn btn-secondary" target="_blank" asp-action="ViewPaymentRequest" asp-route-payReqId="@Model.Id" id="ViewAppButton">View</a>
|
<a class="btn btn-secondary" target="_blank" asp-action="ViewPaymentRequest" asp-route-payReqId="@Model.Id" id="ViewAppButton">View</a>
|
||||||
@@ -120,7 +123,6 @@
|
|||||||
<a class="btn btn-secondary" data-bs-toggle="tooltip" title="Unarchive this payment request" asp-controller="PaymentRequest" asp-action="TogglePaymentRequestArchival" asp-route-payReqId="@Model.Id">Unarchive</a>
|
<a class="btn btn-secondary" data-bs-toggle="tooltip" title="Unarchive this payment request" asp-controller="PaymentRequest" asp-action="TogglePaymentRequestArchival" asp-route-payReqId="@Model.Id">Unarchive</a>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<a asp-action="GetPaymentRequests" asp-route-storeId="@Model.StoreId" class="btn btn-link px-0 ms-3">Back to list</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,14 +22,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row mb-2">
|
||||||
<div class="col-12 col-lg-6 mb-3 ms-auto">
|
<div class="col col-lg-8 col-xl-6 mr-auto">
|
||||||
<form asp-action="GetPaymentRequests" method="get">
|
<form asp-action="GetPaymentRequests" method="get">
|
||||||
<input type="hidden" asp-for="Count"/>
|
<input type="hidden" asp-for="Count"/>
|
||||||
<input type="hidden" asp-for="TimezoneOffset" />
|
<input type="hidden" asp-for="TimezoneOffset" />
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input asp-for="SearchTerm" class="form-control" style="width:300px;"/>
|
<input asp-for="SearchTerm" class="form-control" />
|
||||||
<button type="submit" class="btn btn-secondary" title="Search invoice">
|
<button type="submit" class="btn btn-secondary text-nowrap" title="Search invoice">
|
||||||
<span class="fa fa-search"></span> Search
|
<span class="fa fa-search"></span> Search
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
|||||||
Reference in New Issue
Block a user