mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +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
|
// Fixed amount: Add price and currency as hidden inputs
|
||||||
if (isFixedAmount) {
|
if (isFixedAmount) {
|
||||||
if (srvModel.price !== '')
|
if (srvModel.price)
|
||||||
html += addInput(priceInputName, srvModel.price);
|
html += addInput(priceInputName, srvModel.price);
|
||||||
if(allowCurrencySelection){
|
if(allowCurrencySelection){
|
||||||
html += addInput("currency", srvModel.currency);
|
html += addInput("currency", srvModel.currency);
|
||||||
|
@ -158,7 +158,8 @@ function inputChanges(event, buttonSize) {
|
||||||
else if (isCustomAmount) {
|
else if (isCustomAmount) {
|
||||||
html += ' <div class="btcpay-custom-container">\n <div class="btcpay-custom">\n';
|
html += ' <div class="btcpay-custom-container">\n <div class="btcpay-custom">\n';
|
||||||
html += srvModel.simpleInput ? '' : addPlusMinusButton("-", srvModel.step, srvModel.min, srvModel.max);
|
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 += srvModel.simpleInput ? '' : addPlusMinusButton("+", srvModel.step, srvModel.min, srvModel.max);
|
||||||
html += ' </div>\n';
|
html += ' </div>\n';
|
||||||
if(allowCurrencySelection) {
|
if(allowCurrencySelection) {
|
||||||
|
@ -198,7 +199,7 @@ function inputChanges(event, buttonSize) {
|
||||||
var url = new URL(form.getAttribute("action"));
|
var url = new URL(form.getAttribute("action"));
|
||||||
var formData = new FormData(form);
|
var formData = new FormData(form);
|
||||||
formData.forEach((value, key) => {
|
formData.forEach((value, key) => {
|
||||||
if(key !== "jsonResponse"){
|
if (key !== "jsonResponse") {
|
||||||
url.searchParams.append(key, value);
|
url.searchParams.append(key, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue