From aa0495108126da452098116143afa535c3da6383 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Mon, 5 Oct 2020 04:26:11 -0500 Subject: [PATCH] Showing CheckForNewVersions checkbox only if BTCPAY_UPDATEURL is set --- BTCPayServer/Controllers/ServerController.cs | 1 + BTCPayServer/Views/Server/Policies.cshtml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/Controllers/ServerController.cs b/BTCPayServer/Controllers/ServerController.cs index 24497b815..8139fd2f5 100644 --- a/BTCPayServer/Controllers/ServerController.cs +++ b/BTCPayServer/Controllers/ServerController.cs @@ -254,6 +254,7 @@ namespace BTCPayServer.Controllers { var data = (await _SettingsRepository.GetSettingAsync()) ?? new PoliciesSettings(); ViewBag.AppsList = await GetAppSelectList(); + ViewBag.UpdateUrlPresent = _Options.UpdateUrl != null; return View(data); } diff --git a/BTCPayServer/Views/Server/Policies.cshtml b/BTCPayServer/Views/Server/Policies.cshtml index a097216ec..92ff442e5 100644 --- a/BTCPayServer/Views/Server/Policies.cshtml +++ b/BTCPayServer/Views/Server/Policies.cshtml @@ -1,4 +1,4 @@ -@model BTCPayServer.Services.PoliciesSettings +@model BTCPayServer.Services.PoliciesSettings @{ ViewData.SetActivePageAndTitle(ServerNavPages.Policies); } @@ -42,11 +42,14 @@ + @if (ViewBag.UpdateUrlPresent) + {
+ }