ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Views/Product/ProductEmailAFriend.cshtml
@model ProductEmailAFriendModel
@inject IPageHeadBuilder pagebuilder
@{
    Layout = "_ColumnsOne";

    //title
    pagebuilder.AddTitleParts(Model.ProductName);
    pagebuilder.AddTitleParts(T("PageTitle.ProductEmailAFriend").Text);
}
<div class="page email-a-friend-page">
    <h1 class="h4 text-xs-center generalTitle">@T("Products.EmailAFriend.Title")</h1>
    <div class="card">
        <h4 class="card-header"><a href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })" class="product">@Model.ProductName</a></h4>
        <div class="card-body pb-0">
            @if (Model.SuccessfullySent)
            {
                <section class="result">
                    @Model.Result
                </section>
            }
            else
            {
                <form asp-route="ProductEmailAFriend" method="post">
                    <div asp-validation-summary="ModelOnly" class="message-error"></div>
                    <div class="form-fields">
                        <div class="form-group">
                            <label asp-for="FriendEmail" class="col-form-label">@T("Products.EmailAFriend.FriendEmail"):</label>
                            <input asp-for="FriendEmail" class="form-control friend-email" placeholder="@T("Products.EmailAFriend.FriendEmail.Hint")" />
                            <span asp-validation-for="FriendEmail"></span>
                        </div>
                        <div class="form-group">
                            <label asp-for="YourEmailAddress" class="col-form-label">@T("Products.EmailAFriend.YourEmailAddress"):</label>
                            <input asp-for="YourEmailAddress" class="form-control your-email" placeholder="@T("Products.EmailAFriend.YourEmailAddress.Hint")" />
                            <span asp-validation-for="YourEmailAddress"></span>
                        </div>
                        <div class="form-group">
                            <label asp-for="PersonalMessage" class="col-form-label">@T("Products.EmailAFriend.PersonalMessage"):</label>
                            <textarea asp-for="PersonalMessage" class="form-control your-email" placeholder="@T("Products.EmailAFriend.PersonalMessage.Hint")"></textarea>
                            <span asp-validation-for="PersonalMessage"></span>
                        </div>
                        @if (Model.DisplayCaptcha)
                        {
                            <div class="captcha-box">
                                <captcha />
                            </div>
                        }
                    </div>
                    <div class="btn-group">
                        <input type="submit" name="send-email" class="btn btn-info send-email-a-friend-button" value="@T("Products.EmailAFriend.Button")" />
                    </div>
                </form>
            }
        </div>
    </div>
</div>
