#199 : Correction de bug sur l'ajout des commentaires si le ModelState n'est pas valide.
This commit is contained in:
@@ -125,30 +125,31 @@
|
||||
<h4 class="mb-4">Donne ton avis sur le titre</h4>
|
||||
|
||||
<form asp-action="Comment" asp-controller="Titre" asp-route-id="@Model.Details.IdTitre" method="post">
|
||||
<input type="hidden" name="IdTitre" value="@Model.Details.IdTitre"/>
|
||||
<input asp-for="CommentForm.IdTitre" type="hidden" />
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger mb-3"></div>
|
||||
|
||||
<div class="row mb-3 align-items-center">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<label asp-for="CommentForm.Auteur" class="col-sm-2 col-form-label">
|
||||
Nom<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col">
|
||||
<input name="Auteur"
|
||||
<input asp-for="CommentForm.Auteur"
|
||||
class="form-control input-full"
|
||||
placeholder="Votre nom"
|
||||
required/>
|
||||
placeholder="Votre nom" />
|
||||
<span asp-validation-for="CommentForm.Auteur" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3 align-items-start">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<label asp-for="CommentForm.Contenu" class="col-sm-2 col-form-label">
|
||||
Commentaire<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col">
|
||||
<textarea name="Contenu"
|
||||
<textarea asp-for="CommentForm.Contenu"
|
||||
rows="3"
|
||||
class="form-control input-full"
|
||||
placeholder="Votre commentaire..."
|
||||
required></textarea>
|
||||
placeholder="Votre commentaire..."></textarea>
|
||||
<span asp-validation-for="CommentForm.Contenu" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user