From 7b9b418e931845dfeb59fa28c079d97cbe79369b Mon Sep 17 00:00:00 2001 From: Kukks Date: Tue, 8 Dec 2020 09:49:51 +0100 Subject: [PATCH] FIx Pay Button Link preview when app mode chosen Apps cannot have a link as they only have a POST action. --- BTCPayServer/Views/Stores/PayButton.cshtml | 8 +++++--- BTCPayServer/wwwroot/paybutton/paybutton.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/BTCPayServer/Views/Stores/PayButton.cshtml b/BTCPayServer/Views/Stores/PayButton.cshtml index e8badec7b..f9e01ce43 100644 --- a/BTCPayServer/Views/Stores/PayButton.cshtml +++ b/BTCPayServer/Views/Stores/PayButton.cshtml @@ -153,9 +153,11 @@

Preview

-

Link

- Alternatively, you can share this link or encode it in a QR code - +
+

Link

+ Alternatively, you can share this link or encode it in a QR code + +

diff --git a/BTCPayServer/wwwroot/paybutton/paybutton.js b/BTCPayServer/wwwroot/paybutton/paybutton.js index a826c06d6..cfce74a20 100644 --- a/BTCPayServer/wwwroot/paybutton/paybutton.js +++ b/BTCPayServer/wwwroot/paybutton/paybutton.js @@ -197,7 +197,7 @@ function inputChanges(event, buttonSize) { } }); url = url.href; - $("#preview-link").append(`${url}`) + $("#preview-link").html(`${url}`) $('pre code').each(function (i, block) { hljs.highlightBlock(block);