diff --git a/BTCPayServer/Controllers/UIServerController.cs b/BTCPayServer/Controllers/UIServerController.cs index 8a9cfaa37..231b58616 100644 --- a/BTCPayServer/Controllers/UIServerController.cs +++ b/BTCPayServer/Controllers/UIServerController.cs @@ -298,9 +298,9 @@ namespace BTCPayServer.Controllers [HttpPost("server/policies")] public async Task Policies([FromServices] BTCPayNetworkProvider btcPayNetworkProvider, PoliciesSettings settings, string command = "") { - ViewBag.UpdateUrlPresent = _Options.UpdateUrl != null; ViewBag.AppsList = await GetAppSelectList(); + if (command == "add-domain") { ModelState.Clear(); diff --git a/BTCPayServer/Views/UIServer/Policies.cshtml b/BTCPayServer/Views/UIServer/Policies.cshtml index aa6a634ac..ae0a9360f 100644 --- a/BTCPayServer/Views/UIServer/Policies.cshtml +++ b/BTCPayServer/Views/UIServer/Policies.cshtml @@ -2,8 +2,10 @@ @using BTCPayServer.Services.Mails; @model BTCPayServer.Services.PoliciesSettings @inject SettingsRepository _SettingsRepository +@inject BTCPayNetworkProvider BTCPayNetworkProvider @{ ViewData.SetActivePage(ServerNavPages.Policies); + var networks = BTCPayNetworkProvider.GetAll().ToArray(); }

@ViewData["Title"]

@@ -13,151 +15,160 @@
} -
-
-

Existing User Settings

-
- - - - - - -
-
- - - - - - -
-
- - - -
-
- -
-

New User Settings

-
- @{ - var emailSettings = (await _SettingsRepository.GetSettingAsync()) ?? new EmailSettings(); - /* The "|| Model.RequiresConfirmedEmail" check is for the case when a user had checked - the checkbox without first configuring the e-mail settings so that they can uncheck it. */ - var isEmailConfigured = emailSettings.IsComplete() || Model.RequiresConfirmedEmail; - } - - - - - - - @if (!isEmailConfigured) - { -
- Your email server has not been configured. Please configure it first. +
+
+ +
+

Existing User Settings

+
+ + + + + + +
+
+ + + + + + +
+
+ + +
- } -
-
- - - -
- -
- - - -
-
- -
-

Notification Settings

-
- - - - - - -
-
- - - - - - -
-
- -
-

Maintenance Settings

- @if (ViewBag.UpdateUrlPresent) - { -
- - -
- } -
- - - - - - -
-
- - -
-
-

Plugins

-
-
-
- - - -
-
- - -
-
-
+
+

New User Settings

+
+ @{ + var emailSettings = (await _SettingsRepository.GetSettingAsync()) ?? new EmailSettings(); + /* The "|| Model.RequiresConfirmedEmail" check is for the case when a user had checked + the checkbox without first configuring the e-mail settings so that they can uncheck it. */ + var isEmailConfigured = emailSettings.IsComplete() || Model.RequiresConfirmedEmail; + } + + + + + + + @if (!isEmailConfigured) + { +
+ Your email server has not been configured. Please configure it first. +
+ } +
+
+ + + +
-

Customization Settings

+
+ + + +
+
-
- - - @if (!Model.DomainToAppMapping.Any()) - { - - } -
+
+

Notification Settings

+
+ + + + + + +
+
+ + + + + + +
+
- @if (Model.DomainToAppMapping.Any()) - { -
- Domain to app mapping - -
-
- @for (var index = 0; index < Model.DomainToAppMapping.Count; index++) +
+

Maintenance Settings

+ @if (ViewBag.UpdateUrlPresent) + { +
+ + + +
+ } +
+ + + + + + +
+
+ + +
+
+ +

Plugins

+
+ + + +
+
+ + +
+ + @* To handle the multiple submit buttons on this page: Give this button + a specific order to put it last, but keep it first in the markup *@ +
+ +
+ +

Customization Settings

+
+ + + @if (!Model.DomainToAppMapping.Any()) + { + + } +
+ + @if (Model.DomainToAppMapping.Any()) { -
-
-
+
+ Domain to app mapping + +
+
+ @for (var index = 0; index < Model.DomainToAppMapping.Count; index++) + { +
- +
+ + +
@@ -170,32 +181,11 @@
-
- - -
-
+ }
} -
- } - - -
- - - - +
@section PageFootContent {