81 lines
3.8 KiB
Smarty
81 lines
3.8 KiB
Smarty
<div data-reload="product_question" class="review-form">
|
|
{if $body.sent}
|
|
<div class="alert alert-success">
|
|
{t}Hodnocení bylo odesláno. Děkujeme!{/t}
|
|
</div>
|
|
{elseif $body.already_rated or $product_reviews.user_already_rated}
|
|
<div class="alert alert-info">
|
|
{t}Tento produkt jste už hodnotil(a){/t}.
|
|
</div>
|
|
{else}
|
|
|
|
{if $body.error}
|
|
<div class="alert alert-danger">
|
|
{$body.error}
|
|
</div>
|
|
{/if}
|
|
{if $body.verified}
|
|
<p class="title">{t}Vložit ověřenou recenzi{/t}</p>
|
|
{else}
|
|
<p class="title">{t}Nakoupili jste produkt u nás?{/t}</p>
|
|
<a href="{path('kupshop_catalog_reviews_productreviewverify', ['id'=>$body.product.id])}"
|
|
type="button" class="{$tpl_vars.review_add_btn|default:"btn btn-secondary"}"
|
|
data-ondemand><i class="fc icons_check-circle"></i>{t}Vložit ověřenou recenzi{/t}</a>
|
|
<p class="separator"><span>{t}nebo{/t}</span></p>
|
|
<p class="title">{t}Vložit recenzi bez ověření{/t}</p>
|
|
{/if}
|
|
<form name="review" method="post" action="{path('kupshop_catalog_reviews_productreview', ['id' => $body.product.id])}" data-recaptcha-lazy>
|
|
<input type="hidden" name="id_product" value="{$body.product.id}">
|
|
<input type="hidden" name="id_user" value="{$body.id_user}">
|
|
<input type="hidden" name="order_no" value="{$body.data.order_no}">
|
|
<input type="hidden" name="email" value="{$body.data.email}">
|
|
<input type="hidden" name="acn" value="SendReview">
|
|
|
|
{block "items"}
|
|
<div class="form-group required">
|
|
<label>{t}Hodnocení{/t}</label>
|
|
|
|
<fieldset class="review-stars-picker">
|
|
{$i=5}
|
|
{while $i > 0}
|
|
<input type="radio" id="star{$i}" name="rating" value="{$i}"
|
|
oninvalid="this.setCustomValidity('{t}Vyberte prosím počet hvězdiček{/t}')"
|
|
oninput="this.setCustomValidity('')" required
|
|
{if $body.data.rating == $i}checked{/if}>
|
|
<label for="star{$i}"
|
|
title="{$i} {t plural="hvězdičky" plural5="hvězdiček" count=$i}hvězdička{/t}"></label>
|
|
{$i=$i-1}
|
|
{/while}
|
|
</fieldset>
|
|
</div>
|
|
{block "additional-items"}{/block}
|
|
<div class="form-group">
|
|
<label for="summary">{t}Vaše recenze{/t}</label>
|
|
<textarea class="form-control" name="summary" id="summary">{$body.data.summary}</textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="pros">{t}Klady{/t}</label>
|
|
<textarea class="form-control" name="pros" id="pros">{$body.data.pros}</textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="cons">{t}Zápory{/t}</label>
|
|
<textarea class="form-control" name="cons" id="cons">{$body.data.cons}</textarea>
|
|
</div>
|
|
{if !$body.verified}
|
|
<div class="form-group">
|
|
<label for="name">{t}Vaše jméno{/t}</label>
|
|
<input type="text" class="form-control" name="name" id="name" value="{$body.data.name}" >
|
|
</div>
|
|
{/if}
|
|
{/block}
|
|
|
|
<p>{t escape=false url={url s=page label='review-rules'}}Recenze musí splňovat
|
|
<a href="{url}" target="_blank">tyto podmínky</a>
|
|
a zobrazí se až po jejím schválení.{/t}</p>
|
|
<p><span>*</span> {t}Pole označená hvězdičkou jsou povinná.{/t}</p>
|
|
|
|
<button type="submit" name="rSubmit" class="btn btn-primary" data-sitekey="{findModule('recaptcha','site_shared')}" data-recaptcha="btn">{t}Odeslat{/t}</button>
|
|
</form>
|
|
{/if}
|
|
</div>
|