39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
@using TIAM.Entities.Transfers
|
|
@using TIAMWebApp.Shared.Application.Models
|
|
|
|
|
|
<EditForm Model="@Tour" OnValidSubmit="@HandleValidSubmit">
|
|
<DataAnnotationsValidator />
|
|
<ValidationSummary />
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label">Title</label>
|
|
<InputText class="form-control" @bind-Value="Tour.Title" />
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label">Fancy Description</label>
|
|
<InputTextArea class="form-control" @bind-Value="Tour.FancyDescription" rows="4" />
|
|
</div>
|
|
|
|
<div class="d-flex gap-2">
|
|
<button type="submit" class="btn btn-success">Save</button>
|
|
<button type="button" class="btn btn-secondary" @onclick="HandleCancel">Cancel</button>
|
|
</div>
|
|
</EditForm>
|
|
|
|
@code {
|
|
[Parameter] public TourInfo Tour { get; set; } = new();
|
|
[Parameter] public EventCallback<TourInfo> OnSave { get; set; }
|
|
[Parameter] public EventCallback OnCancel { get; set; }
|
|
|
|
private async Task HandleValidSubmit()
|
|
{
|
|
await OnSave.InvokeAsync(Tour);
|
|
}
|
|
|
|
private async Task HandleCancel()
|
|
{
|
|
await OnCancel.InvokeAsync(Tour);
|
|
}
|
|
} |