Files
laatzen/LaaProductionWeb/LaaProductionWeb/Views/Account/Authorize.cshtml
T

36 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@model PermissionsModel
@using LaaProductionWeb.Services.Models
<div class="d-flex justify-content-center align-items-center h-100">
@if (this.Model.Role.Pending is null)
{
<div class="col-md-3 card p-5">
<form action="/Account/Authorize" method="post" autocomplete="off">
@this.Html.AntiForgeryToken()
@this.Html.HiddenFor(x => x.UserId)
@this.Html.Partial(nameof(UserRole), this.Model.Role, new ViewDataDictionary { { "namePattern", $"{nameof(this.Model.Role)}.{{0}}" } })
<h5 class="mb-3">Ihnen fehlt die Berechtigung – '@this.Model.Role.DisplayName'.</h5>
<div class="form-floating mb-3">
@this.Html.TextBoxFor(x => x.FirstName, new { @class = "form-control", placeholder = "Vorname" })
@this.Html.LabelFor(x => x.FirstName, new { @class = "text-secondary" })
@this.Html.ValidationMessageFor(x => x.FirstName, string.Empty, new { @class = "small text-danger" })
</div>
<div class="form-floating mb-3">
@this.Html.TextBoxFor(x => x.LastName, new { @class = "form-control", placeholder = "Vorname" })
@this.Html.LabelFor(x => x.LastName, new { @class = "text-secondary" })
@this.Html.ValidationMessageFor(x => x.LastName, string.Empty, new { @class = "small text-danger" })
</div>
<button type="submit" class="btn btn-primary py-3 w-100">Berechtigung anfordern</button>
</form>
</div>
}
else
{
<div class="col-md-3 card p-5 border-success">
<h1 class="text-center text-success"><i class="bi bi-shield-exclamation"></i></h1>
<h6 class="text-center text-success">Ihre anfrage für die berechtigung – '@this.Model.Role.DisplayName' ist in bearbeitung ...</h6>
</div>
}
</div>