feat(theme): LoginCard
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
@namespace ZB.MOM.WW.Theme
|
||||
@* Components/LoginCard.razor — static form-POST sign-in card. *@
|
||||
<div class="login-wrap rise">
|
||||
<section class="panel">
|
||||
<div class="login-body">
|
||||
<h1 class="login-title">@Product — sign in</h1>
|
||||
<form method="post" action="@Action" data-enhance="false">
|
||||
@if (!string.IsNullOrEmpty(ReturnUrl))
|
||||
{
|
||||
<input type="hidden" name="returnUrl" value="@ReturnUrl" />
|
||||
}
|
||||
@ChildContent @* e.g. <AntiforgeryToken/> supplied by the app *@
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="username">Username</label>
|
||||
<input id="username" name="username" type="text"
|
||||
class="form-control form-control-sm" autocomplete="username" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="password">Password</label>
|
||||
<input id="password" name="password" type="password"
|
||||
class="form-control form-control-sm" autocomplete="current-password" />
|
||||
</div>
|
||||
@if (!string.IsNullOrWhiteSpace(Error))
|
||||
{
|
||||
<div class="panel notice login-error">@Error</div>
|
||||
}
|
||||
<button class="btn btn-primary w-100" type="submit">Sign in</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired] public string Product { get; set; } = string.Empty;
|
||||
[Parameter] public string Action { get; set; } = "/auth/login";
|
||||
[Parameter] public string? ReturnUrl { get; set; }
|
||||
[Parameter] public string? Error { get; set; }
|
||||
[Parameter] public RenderFragment? ChildContent { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user