@page "/addChapter"
@using Blazor.Models
@using Blazor.Components
<PageTitle>@Localizer["PageTitle"]</PageTitle> 
<BackButton RedirectionPage="/chapters"></BackButton>

<div class="container text-center">
    <div class="border border-dark p-4 d-inline-block">
        <h3>@Localizer["Title"]</h3>


        <EditForm Model="@chapterModel" OnValidSubmit="@HandleValidSubmit">
            <DataAnnotationsValidator />
            <ValidationSummary />

            <div class="row mb-3">
                <div class="col-4 text-end">
                    <label for="name" class="col-form-label">@Localizer["Name"] :</label>
                </div>
                <div class="col-8">
                    <InputText id="name" @bind-Value="chapterModel.Name" class="form-control" />
                </div>
            </div>
    

            <button type="submit" class="btn btn-success mb-2">@Localizer["Submit"]</button>
        </EditForm>
    </div>
</div>