mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 22:11:48 +01:00
Fix paybutton like when no amount set
This commit is contained in:
parent
ffbf70d72b
commit
a20906bc12
1 changed files with 4 additions and 3 deletions
|
@ -148,7 +148,7 @@ function inputChanges(event, buttonSize) {
|
|||
|
||||
// Fixed amount: Add price and currency as hidden inputs
|
||||
if (isFixedAmount) {
|
||||
if (srvModel.price !== '')
|
||||
if (srvModel.price)
|
||||
html += addInput(priceInputName, srvModel.price);
|
||||
if(allowCurrencySelection){
|
||||
html += addInput("currency", srvModel.currency);
|
||||
|
@ -158,7 +158,8 @@ function inputChanges(event, buttonSize) {
|
|||
else if (isCustomAmount) {
|
||||
html += ' <div class="btcpay-custom-container">\n <div class="btcpay-custom">\n';
|
||||
html += srvModel.simpleInput ? '' : addPlusMinusButton("-", srvModel.step, srvModel.min, srvModel.max);
|
||||
html += ' ' + addInputPrice(priceInputName, srvModel.price, widthInput, "", "number", srvModel.min, srvModel.max, srvModel.step);
|
||||
if (srvModel.price)
|
||||
html += ' ' + addInputPrice(priceInputName, srvModel.price, widthInput, "", "number", srvModel.min, srvModel.max, srvModel.step);
|
||||
html += srvModel.simpleInput ? '' : addPlusMinusButton("+", srvModel.step, srvModel.min, srvModel.max);
|
||||
html += ' </div>\n';
|
||||
if(allowCurrencySelection) {
|
||||
|
@ -198,7 +199,7 @@ function inputChanges(event, buttonSize) {
|
|||
var url = new URL(form.getAttribute("action"));
|
||||
var formData = new FormData(form);
|
||||
formData.forEach((value, key) => {
|
||||
if(key !== "jsonResponse"){
|
||||
if (key !== "jsonResponse") {
|
||||
url.searchParams.append(key, value);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue