@model ReviewApp.Models.ViewModels.AddCommentViewModel

<h1>Добавление отзыва</h1>

<h2>Товар: @Model.GoodName</h2>

<div class="centrally-aligned">
    <img class="good-image-big" src="/Files/GoodImage/@Model.GoodId" alt="Товар" />
</div>

<form asp-controller="Home" asp-action="AddCommentPost" method="post" class="add-comment-form">
    <div class="full-width">
        
        <div asp-validation-summary="All" class="validation-summary"></div>

        <label asp-for="Comment.Content"></label>:
        <textarea asp-for="Comment.Content" class="full-width"></textarea>

        <label asp-for="Comment.Rating"></label>:
        <input asp-for="Comment.Rating" type="hidden" id="rating"/>

        <input asp-for="GoodId" type="hidden" value="@Model.GoodId"/>
        <input asp-for="GoodName" type="hidden" value="@Model.GoodName"/>
        <div class="place-for-stars" id="stars-container"></div>
        <div>
            <button class="add-comment-button" type="submit" id="button">Добавить</button>
        </div>
    </div>

    @Html.AntiForgeryToken()
</form>

@section Scripts
{
    <script src="~/js/AddStars.js" asp-append-version="true"></script>
}