mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
parent
ae9b93ca8f
commit
dfdb99165b
@ -364,7 +364,7 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IActionResult> Register(string returnUrl = null, bool logon = true)
|
public async Task<IActionResult> Register(string returnUrl = null, bool logon = true, bool useBasicLayout = false)
|
||||||
{
|
{
|
||||||
var policies = await _SettingsRepository.GetSettingAsync<PoliciesSettings>() ?? new PoliciesSettings();
|
var policies = await _SettingsRepository.GetSettingAsync<PoliciesSettings>() ?? new PoliciesSettings();
|
||||||
if (policies.LockSubscription && !User.IsInRole(Roles.ServerAdmin))
|
if (policies.LockSubscription && !User.IsInRole(Roles.ServerAdmin))
|
||||||
@ -372,6 +372,7 @@ namespace BTCPayServer.Controllers
|
|||||||
ViewData["ReturnUrl"] = returnUrl;
|
ViewData["ReturnUrl"] = returnUrl;
|
||||||
ViewData["Logon"] = logon.ToString(CultureInfo.InvariantCulture).ToLowerInvariant();
|
ViewData["Logon"] = logon.ToString(CultureInfo.InvariantCulture).ToLowerInvariant();
|
||||||
ViewData["AllowIsAdmin"] = _Options.AllowAdminRegistration;
|
ViewData["AllowIsAdmin"] = _Options.AllowAdminRegistration;
|
||||||
|
ViewData["UseBasicLayout"] = useBasicLayout;
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
@model RegisterViewModel
|
@model RegisterViewModel
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Register";
|
ViewData["Title"] = "Register";
|
||||||
Layout = "_WelcomeLayout.cshtml";
|
var useBasicLayout = ViewData["UseBasicLayout"] is true;
|
||||||
|
Layout = useBasicLayout ? "../Shared/_Layout.cshtml" : "_WelcomeLayout.cshtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="modal-dialog modal-login">
|
<!-- We want to center the dialog box in case we are not using the Welcome layout -->
|
||||||
|
<div class="modal-dialog @(useBasicLayout ? "modal-dialog-centered" : "")">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">Create account</h4>
|
<h4 class="modal-title">Create account</h4>
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
asp-action="Register"
|
asp-action="Register"
|
||||||
asp-route-returnUrl="@Context.Request.GetCurrentPath()"
|
asp-route-returnUrl="@Context.Request.GetCurrentPath()"
|
||||||
asp-route-logon="false"
|
asp-route-logon="false"
|
||||||
|
asp-route-useBasicLayout="true"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
role="button">
|
role="button">
|
||||||
<span class="fa fa-plus"></span> Add User
|
<span class="fa fa-plus"></span> Add User
|
||||||
|
Loading…
Reference in New Issue
Block a user