2025-03-03 00:56:32 +01:00
|
|
|
@using WatchIt.DTO.Models.Controllers.Genders.Gender
|
|
|
|
|
@using WatchIt.Website.Components.Subcomponents.Common
|
|
|
|
|
|
|
|
|
|
@inherits Component
|
2024-10-19 21:14:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel @(Class)">
|
2024-10-04 19:32:25 +02:00
|
|
|
@if (_loaded)
|
|
|
|
|
{
|
2025-03-03 00:56:32 +01:00
|
|
|
<EditForm Model="@(_request)">
|
2024-10-04 19:32:25 +02:00
|
|
|
<AntiforgeryToken/>
|
|
|
|
|
<div class="container-grid">
|
|
|
|
|
<div class="row form-group mb-1">
|
|
|
|
|
<label for="name" class="col-2 col-form-label">Name*</label>
|
|
|
|
|
<div class="col-10">
|
2025-03-03 00:56:32 +01:00
|
|
|
<InputText id="name" class="form-control" @bind-Value="_request!.Name"/>
|
2024-10-04 19:32:25 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row form-group mb-1">
|
|
|
|
|
<label for="fullName" class="col-2 col-form-label">Full name</label>
|
|
|
|
|
<div class="col-10">
|
2025-03-03 00:56:32 +01:00
|
|
|
<InputText id="fullName" class="form-control" @bind-Value="_request!.FullName"/>
|
2024-10-04 19:32:25 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row form-group my-1">
|
|
|
|
|
<label for="desc" class="col-2 col-form-label">Description</label>
|
|
|
|
|
<div class="col-10">
|
2025-03-03 00:56:32 +01:00
|
|
|
<InputTextArea id="desc" class="form-control" @bind-Value="_request!.Description"/>
|
2024-10-04 19:32:25 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row form-group mb-1">
|
|
|
|
|
<label for="birthDeathDates" class="col-2 col-form-label">Birth and death</label>
|
|
|
|
|
<div class="col-10">
|
|
|
|
|
<div id="birthDeathDates" class="input-group">
|
2025-03-03 00:56:32 +01:00
|
|
|
<InputDate TValue="DateOnly?" class="form-control" @bind-Value="_request!.BirthDate"/>
|
2024-10-04 19:32:25 +02:00
|
|
|
<span class="input-group-text">-</span>
|
2025-03-03 00:56:32 +01:00
|
|
|
<InputDate TValue="DateOnly?" class="form-control" @bind-Value="_request!.DeathDate"/>
|
2024-10-04 19:32:25 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row form-group my-1">
|
|
|
|
|
<label for="desc" class="col-2 col-form-label">Gender</label>
|
|
|
|
|
<div class="col-10">
|
2025-03-03 00:56:32 +01:00
|
|
|
<InputSelect TValue="short?" id="desc" class="form-control" @bind-Value="_request!.GenderId">
|
2024-10-04 19:32:25 +02:00
|
|
|
<option value="@(default(short?))">No choice</option>
|
|
|
|
|
@foreach (GenderResponse gender in _genders)
|
|
|
|
|
{
|
|
|
|
|
<option value="@(gender.Id)">@(gender.Name)</option>
|
|
|
|
|
}
|
|
|
|
|
</InputSelect>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-08 02:14:16 +02:00
|
|
|
<div class="row mt-2">
|
2025-03-03 00:56:32 +01:00
|
|
|
<div class="col d-flex flex-column align-items-end">
|
|
|
|
|
<button type="submit" class="btn btn-secondary" disabled="@(_saving)" @onclick="@(SaveData)">
|
|
|
|
|
<LoadingButtonContent IsLoading="@(_saving)" Content="Save" LoadingContent="Saving..."/>
|
2024-10-05 12:24:38 +02:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-04 19:32:25 +02:00
|
|
|
</div>
|
|
|
|
|
</EditForm>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2025-03-03 00:56:32 +01:00
|
|
|
<Loading Color="@(Loading.Colors.Light)"/>
|
2024-10-04 19:32:25 +02:00
|
|
|
}
|
|
|
|
|
</div>
|