Showing CheckForNewVersions checkbox only if BTCPAY_UPDATEURL is set

This commit is contained in:
rockstardev 2020-10-05 04:26:11 -05:00
parent 2a3dbaa7b4
commit aa04951081
2 changed files with 5 additions and 1 deletions

View File

@ -254,6 +254,7 @@ namespace BTCPayServer.Controllers
{
var data = (await _SettingsRepository.GetSettingAsync<PoliciesSettings>()) ?? new PoliciesSettings();
ViewBag.AppsList = await GetAppSelectList();
ViewBag.UpdateUrlPresent = _Options.UpdateUrl != null;
return View(data);
}

View File

@ -1,4 +1,4 @@
@model BTCPayServer.Services.PoliciesSettings
@model BTCPayServer.Services.PoliciesSettings
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Policies);
}
@ -42,11 +42,14 @@
<label asp-for="AllowHotWalletRPCImportForAll" class="form-check-label"></label>
<span asp-validation-for="AllowHotWalletRPCImportForAll" class="text-danger"></span>
</div>
@if (ViewBag.UpdateUrlPresent)
{
<div class="form-check">
<input asp-for="CheckForNewVersions" type="checkbox" class="form-check-input" />
<label asp-for="CheckForNewVersions" class="form-check-label"></label>
<span asp-validation-for="CheckForNewVersions" class="text-danger"></span>
</div>
}
</div>
<div class="form-group">
<label asp-for="RootAppId"></label>