mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-10 09:19:24 +01:00
POS: Fix missing store branding property on form error case (#5658)
When a POS has a form, which results in an error state, the store branding property was not set. This adds the missing property and also does not render the store branding partial, in case the model property isn't present. Fixes #5655.
This commit is contained in:
parent
89d294524a
commit
70e9ea1d5e
2 changed files with 5 additions and 2 deletions
|
@ -516,10 +516,13 @@ namespace BTCPayServer.Plugins.PointOfSale.Controllers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var store = await _appService.GetStore(app);
|
||||||
|
var storeBlob = store.GetStoreBlob();
|
||||||
|
|
||||||
viewModel.FormName = formData.Name;
|
viewModel.FormName = formData.Name;
|
||||||
viewModel.Form = form;
|
viewModel.Form = form;
|
||||||
|
|
||||||
viewModel.FormParameters = formParameters;
|
viewModel.FormParameters = formParameters;
|
||||||
|
viewModel.StoreBranding = new StoreBrandingViewModel(storeBlob);
|
||||||
return View("Views/UIForms/View", viewModel);
|
return View("Views/UIForms/View", viewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<link href="~/main/site.css" asp-append-version="true" rel="stylesheet" />
|
<link href="~/main/site.css" asp-append-version="true" rel="stylesheet" />
|
||||||
|
|
||||||
<partial name="LayoutHeadTheme" />
|
<partial name="LayoutHeadTheme" />
|
||||||
@if (ViewData.TryGetValue("StoreBranding", out var storeBranding))
|
@if (ViewData.TryGetValue("StoreBranding", out var storeBranding) && storeBranding != null)
|
||||||
{
|
{
|
||||||
<partial name="LayoutHeadStoreBranding" model="storeBranding" />
|
<partial name="LayoutHeadStoreBranding" model="storeBranding" />
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue