View improvements

This commit is contained in:
Dennis Reimann 2022-06-21 10:53:38 +02:00 committed by Andrew Camilleri
parent 9e253ac7a3
commit 209cff8888

View File

@ -68,7 +68,7 @@
}
else
{
<select hidden asp-for="SpecificStores" class="form-select" asp-items="@(new SelectList(Model.Stores, nameof(StoreData.Id), nameof(StoreData.StoreName)))" required></select>
<select hidden asp-for="SpecificStores" class="form-select" asp-items="@(new SelectList(Model.Stores, nameof(StoreData.Id), nameof(StoreData.StoreName)))"></select>
@if (Model.RedirectUrl != null)
{
@ -83,17 +83,6 @@
<span asp-validation-for="Label" class="text-danger"></span>
</div>
@if (Model.NeedsStorePermission && Model.SpecificStores.Any())
{
<h2 class="h5 fw-semibold mt-4">Stores</h2>
<ul>
@foreach (var storeId in Model.SpecificStores)
{
<li>@Model.Stores.First(s => s.Id == storeId).StoreName</li>
}
</ul>
}
<h2 class="h5 fw-semibold mt-4">Permissions</h2>
@if (!permissions.Any())
{
@ -104,6 +93,16 @@
}
else
{
if (Model.NeedsStorePermission && Model.SpecificStores.Any())
{
<p class="mb-2">Store-based permissions will be applied for:</p>
<ul class="mb-4 ps-3">
@foreach (var storeId in Model.SpecificStores)
{
<li>@Model.Stores.First(s => s.Id == storeId).StoreName</li>
}
</ul>
}
<div class="list-group list-group-flush mt-3">
@for (var i = 0; i < Model.PermissionValues.Count; i++)
{