{% if currentCustomer.auth %}
<div class="hystmodal" id="newReviewModal" aria-hidden="true">
<div class="hystmodal__wrap">
<div class="hystmodal__window new-review-modal" role="dialog" aria-modal="true">
<button data-hystclose class="hystmodal__close">Закрыть</button>
<div class="">
<div class="hidden new-review-modal__success" id="js-new-review-modal-success">
<div>Спасибо за отзыв!</div>
<div>Он будет виден на странице сразу после модерации.</div>
<div>
<button class="color-btn js-new-review-modal-ok-btn" style="margin: 14px auto 0 auto;">OK</button>
</div>
</div>
<form action="{{ path('add_review',{'id':product.id}) }}" method="post" id="js-new-review-form">
<div class="new-review-modal__header">
<div class="new-review-modal__header-h3">Отзыв к товару «{{ product.name }}»</div>
{% if currentCustomer.mobile %}
<img src="https://perina-peroni.ru{{ products_card_web_dir ~ product.mainImage }}" alt="{{ product.name }}">
{% else %}
<img src="https://perina-peroni.ru{{ products_listing_web_dir ~ product.mainImage }}" alt="{{ product.name }}">
{% endif %}
</div>
<div class="login-modal__form-group">
<label for="js-review-name-input">Ваше имя:</label>
<input type="text" autocomplete="off" name="review[author]" id="js-review-name-input"
value="{{ currentCustomer.customerEntity.firstName }}">
<div class="input-error" data-key="author"></div>
</div>
<div class="login-modal__form-group product-review__score-row">
<label>Оцените товар:</label>
<div class="review-form__stars" id="js-review-stars">
<span class="rating-star" data-item="1"></span>
<span class="rating-star" data-item="2"></span>
<span class="rating-star" data-item="3"></span>
<span class="rating-star" data-item="4"></span>
<span class="rating-star" data-item="5"></span>
</div>
<input type="hidden" name="review[score]" id="js-review-score">
<div class="input-error" data-key="score" style="margin-bottom: -17px;width: auto;"></div>
</div>
<div class="login-modal__form-group">
<label for="js-review-txt-input">Расскажите о товаре:</label>
<textarea name="review[review]" id="js-review-txt-input" class="review-form__textarea"
cols="30" rows="5"></textarea>
<div class="input-error" data-key="review"></div>
</div>
<input type="hidden" class="g-recaptcha-response" name="g-recaptcha-response"/>
<div class="login-modal__form-group" style="margin-bottom: 0">
<div class="input-error-na hidden" data-key="common"></div>
<button type="submit" class="white-btn">Добавить отзыв</button>
</div>
</form>
</div>
<div class="shadow invisible" id="js-one-click-shadow">
<img src="{{ asset('img/spinner.svg') }}" alt="wait" height="74" width="74">
</div>
</div>
</div>
</div>
{% else %}
<div class="hystmodal" id="newReviewModal" aria-hidden="true">
<div class="hystmodal__wrap">
<div class="hystmodal__window new-review-modal" role="dialog" aria-modal="true">
<button data-hystclose class="hystmodal__close">Закрыть</button>
<div class="new-review-modal__reg">
Оставлять вопросы или отзывы могут только зарегистрированные пользователи. <br/>
Пожалуйста, <a href="#" class="js-login-lnk">войдите</a> или <a href="#" class="js-registration-lnk">зарегистрируйтесь</a>
</div>
</div>
</div>
</div>
{% endif %}
<style>
.new-review-modal {
padding: 25px;
border-radius: 10px;
}
.new-review-modal__reg {
font-weight: 600;
font-size: 22px;
line-height: 1.3
}
.new-review-modal__reg a {
text-decoration: underline;
color: #3bacbb;
}
.new-review-modal__reg a:hover {
text-decoration: none;
}
.new-review-modal__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 33px;
}
.new-review-modal__header-h3 {
font-size: 22px;
font-weight: 700;
line-height: 1.4;
width: 458px;
}
.new-review-modal__header img {
max-width: 75px;
border-radius: 6px;
}
.new-review-modal__success {
font-size: 22px;
font-weight: 700;
line-height: 1.4;
}
</style>