Condense la modal d'edition admin
This commit is contained in:
@@ -228,18 +228,32 @@
|
||||
|
||||
<section class="modal @(ShowEditModal ? string.Empty : "hidden")" aria-hidden="@BoolString(!ShowEditModal)">
|
||||
<div class="modal-backdrop" @onclick="CloseEditModal"></div>
|
||||
<div class="modal-card admin-modal-card">
|
||||
<div class="modal-head">
|
||||
<div>
|
||||
<div class="modal-card admin-modal-card admin-edit-modal-card">
|
||||
<div class="modal-head admin-edit-modal-head">
|
||||
<div class="admin-edit-heading">
|
||||
<p class="eyebrow">Edition</p>
|
||||
<h2>@BuildEditModalTitle()</h2>
|
||||
|
||||
@if (SelectedUser is not null)
|
||||
{
|
||||
<div class="admin-edit-chips">
|
||||
<span class="mini-chip admin-chip-outline">@SelectedUser.Username</span>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(SelectedUser.Email))
|
||||
{
|
||||
<span class="mini-chip admin-chip-neutral">@SelectedUser.Email</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="admin-modal-head-actions">
|
||||
<button class="button ghost small" type="button" @onclick="CloseEditModal" disabled="@IsSaving">Fermer</button>
|
||||
</div>
|
||||
<button class="button ghost small" type="button" @onclick="CloseEditModal" disabled="@IsSaving">Fermer</button>
|
||||
</div>
|
||||
|
||||
@if (IsLoadingDetail)
|
||||
{
|
||||
<p class="section-copy">La fiche utilisateur est en cours de chargement.</p>
|
||||
<p class="admin-modal-note">La fiche utilisateur est en cours de chargement.</p>
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(DetailError))
|
||||
{
|
||||
@@ -251,13 +265,11 @@
|
||||
}
|
||||
else if (SelectedUser is null)
|
||||
{
|
||||
<p class="section-copy">Cette fiche n'est plus disponible pour le moment.</p>
|
||||
<p class="admin-modal-note">Cette fiche n'est plus disponible pour le moment.</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="section-copy">
|
||||
Les roles restent geres dans Keycloak. Cette fiche couvre l'etat du compte et le profil du site.
|
||||
</p>
|
||||
<p class="admin-modal-note">Compte Keycloak et profil site. Les roles restent geres dans Keycloak.</p>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(SaveError))
|
||||
{
|
||||
@@ -269,20 +281,16 @@
|
||||
<p class="profile-feedback success">@SaveMessage</p>
|
||||
}
|
||||
|
||||
<div class="profile-meta-grid">
|
||||
<article class="profile-meta-card">
|
||||
<span class="micro-label">Identite Keycloak</span>
|
||||
<strong>@SelectedUser.IdentityDisplayName</strong>
|
||||
</article>
|
||||
<article class="profile-meta-card">
|
||||
<div class="admin-edit-meta-grid">
|
||||
<article class="admin-edit-meta-card">
|
||||
<span class="micro-label">Compte cree le</span>
|
||||
<strong>@FormatDate(SelectedUser.AccountCreatedUtc)</strong>
|
||||
</article>
|
||||
<article class="profile-meta-card">
|
||||
<article class="admin-edit-meta-card">
|
||||
<span class="micro-label">Profil site cree le</span>
|
||||
<strong>@FormatDate(SelectedUser.SiteProfileCreatedUtc)</strong>
|
||||
</article>
|
||||
<article class="profile-meta-card">
|
||||
<article class="admin-edit-meta-card">
|
||||
<span class="micro-label">Profil site mis a jour</span>
|
||||
<strong>@FormatDate(SelectedUser.SiteProfileUpdatedUtc)</strong>
|
||||
</article>
|
||||
@@ -291,12 +299,12 @@
|
||||
<EditForm Model="@EditFormModel" OnValidSubmit="SaveUserAsync">
|
||||
<DataAnnotationsValidator />
|
||||
|
||||
<div class="admin-toggle-grid">
|
||||
<div class="admin-toggle-grid admin-edit-toggle-grid">
|
||||
<label class="admin-toggle-card">
|
||||
<InputCheckbox @bind-Value="EditFormModel.IsEnabled" />
|
||||
<div>
|
||||
<strong>Compte actif</strong>
|
||||
<span>Autoriser ou bloquer la connexion a l'application.</span>
|
||||
<span>Autorise ou bloque la connexion.</span>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
@@ -304,19 +312,19 @@
|
||||
<InputCheckbox @bind-Value="EditFormModel.IsEmailVerified" />
|
||||
<div>
|
||||
<strong>Email verifie</strong>
|
||||
<span>Indique si l'adresse email a ete validee dans Keycloak.</span>
|
||||
<span>Adresse validee dans Keycloak.</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-grid">
|
||||
<div class="admin-form-grid admin-edit-form-grid">
|
||||
<label class="field">
|
||||
<span>Nom d'utilisateur</span>
|
||||
<InputText @bind-Value="EditFormModel.Username" />
|
||||
<ValidationMessage For="@(() => EditFormModel.Username)" />
|
||||
</label>
|
||||
|
||||
<label class="field">
|
||||
<label class="field span-2">
|
||||
<span>Email</span>
|
||||
<InputText @bind-Value="EditFormModel.Email" />
|
||||
<ValidationMessage For="@(() => EditFormModel.Email)" />
|
||||
@@ -363,15 +371,15 @@
|
||||
<ValidationMessage For="@(() => EditFormModel.PreferredFormat)" />
|
||||
</label>
|
||||
|
||||
<label class="field span-2">
|
||||
<label class="field span-3">
|
||||
<span>Cube favori</span>
|
||||
<InputText @bind-Value="EditFormModel.FavoriteCube" />
|
||||
<ValidationMessage For="@(() => EditFormModel.FavoriteCube)" />
|
||||
</label>
|
||||
|
||||
<label class="field span-2">
|
||||
<label class="field span-3">
|
||||
<span>Bio</span>
|
||||
<InputTextArea @bind-Value="EditFormModel.Bio" />
|
||||
<InputTextArea @bind-Value="EditFormModel.Bio" rows="3" />
|
||||
<ValidationMessage For="@(() => EditFormModel.Bio)" />
|
||||
</label>
|
||||
</div>
|
||||
@@ -381,7 +389,6 @@
|
||||
@(IsSaving ? "Enregistrement..." : "Enregistrer les modifications")
|
||||
</button>
|
||||
<button class="button ghost" type="button" @onclick="CloseEditModal" disabled="@IsSaving">Fermer</button>
|
||||
<p class="section-copy">Le profil site est cree automatiquement lors du premier enregistrement.</p>
|
||||
</div>
|
||||
</EditForm>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user