[-] MO : #PSCFV-2924 - Cannot comment a product if there already comments validated
This commit is contained in:
@@ -74,68 +74,6 @@ var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}';
|
||||
{/foreach}
|
||||
{else}
|
||||
{if ($too_early == false AND ($logged OR $allow_guests))}
|
||||
<div style="display: none;">
|
||||
<div id="new_comment_form">
|
||||
<form action="#">
|
||||
<h2 class="title">{l s='Write your review' mod='productcomments'}</h2>
|
||||
<div class="product clearfix">
|
||||
<img src="{$link->getImageLink($product->link_rewrite, $productcomment_cover, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product->name|escape:html:'UTF-8'}" />
|
||||
<div class="product_desc">
|
||||
<p class="product_name"><strong>{$product->name}</strong></p>
|
||||
{$product->description_short}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="new_comment_form_content">
|
||||
<h2>{l s='Write your review' mod='productcomments'}</h2>
|
||||
|
||||
<div id="new_comment_form_error" class="error" style="display: none;">
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
{if $criterions|@count > 0}
|
||||
<ul id="criterions_list">
|
||||
{foreach from=$criterions item='criterion'}
|
||||
<li>
|
||||
<label>{$criterion.name|escape:'html':'UTF-8'}:</label>
|
||||
<div class="star_content">
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="2" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="3" checked="checked" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="4" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="5" />
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<label for="comment_title">{l s='Title' mod='productcomments'}: <sup class="required">*</sup></label>
|
||||
<input id="comment_title" name="title" type="text" value=""/>
|
||||
|
||||
<label for="content">{l s='Comment' mod='productcomments'}: <sup class="required">*</sup></label>
|
||||
<textarea id="content" name="content"></textarea>
|
||||
|
||||
{if $allow_guests == true && $logged == 0}
|
||||
<label>{l s='Your name' mod='productcomments'}: <sup class="required">*</sup></label>
|
||||
<input id="commentCustomerName" name="customer_name" type="text" value=""/>
|
||||
{/if}
|
||||
|
||||
<div id="new_comment_form_footer">
|
||||
<input id="id_product_comment_send" name="id_product" type="hidden" value='{$id_product_comment_form}'></input>
|
||||
<p class="fl required"><sup>*</sup> {l s='Required fields' mod='productcomments'}</p>
|
||||
<p class="fr">
|
||||
<button id="submitNewMessage" name="submitMessage" type="submit">{l s='Send' mod='productcomments'}</button>
|
||||
{l s='or' mod='productcomments'} <a href="#" onclick="$.fancybox.close();">{l s='Cancel' mod='productcomments'}</a>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form><!-- /end new_comment_form_content -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="align_center">
|
||||
<a id="new_comment_tab_btn" class="open-comment-form" href="#new_comment_form">{l s='Be the first to write your review' mod='productcomments'} !</a>
|
||||
</p>
|
||||
@@ -145,3 +83,67 @@ var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}';
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fancybox -->
|
||||
<div style="display: none;">
|
||||
<div id="new_comment_form">
|
||||
<form action="#">
|
||||
<h2 class="title">{l s='Write your review' mod='productcomments'}</h2>
|
||||
<div class="product clearfix">
|
||||
<img src="{$link->getImageLink($product->link_rewrite, $productcomment_cover, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product->name|escape:html:'UTF-8'}" />
|
||||
<div class="product_desc">
|
||||
<p class="product_name"><strong>{$product->name}</strong></p>
|
||||
{$product->description_short}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="new_comment_form_content">
|
||||
<h2>{l s='Write your review' mod='productcomments'}</h2>
|
||||
|
||||
<div id="new_comment_form_error" class="error" style="display: none;">
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
{if $criterions|@count > 0}
|
||||
<ul id="criterions_list">
|
||||
{foreach from=$criterions item='criterion'}
|
||||
<li>
|
||||
<label>{$criterion.name|escape:'html':'UTF-8'}:</label>
|
||||
<div class="star_content">
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="2" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="3" checked="checked" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="4" />
|
||||
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="5" />
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<label for="comment_title">{l s='Title' mod='productcomments'}: <sup class="required">*</sup></label>
|
||||
<input id="comment_title" name="title" type="text" value=""/>
|
||||
|
||||
<label for="content">{l s='Comment' mod='productcomments'}: <sup class="required">*</sup></label>
|
||||
<textarea id="content" name="content"></textarea>
|
||||
|
||||
{if $allow_guests == true && $logged == 0}
|
||||
<label>{l s='Your name' mod='productcomments'}: <sup class="required">*</sup></label>
|
||||
<input id="commentCustomerName" name="customer_name" type="text" value=""/>
|
||||
{/if}
|
||||
|
||||
<div id="new_comment_form_footer">
|
||||
<input id="id_product_comment_send" name="id_product" type="hidden" value='{$id_product_comment_form}'></input>
|
||||
<p class="fl required"><sup>*</sup> {l s='Required fields' mod='productcomments'}</p>
|
||||
<p class="fr">
|
||||
<button id="submitNewMessage" name="submitMessage" type="submit">{l s='Send' mod='productcomments'}</button>
|
||||
{l s='or' mod='productcomments'} <a href="#" onclick="$.fancybox.close();">{l s='Cancel' mod='productcomments'}</a>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form><!-- /end new_comment_form_content -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- End fancybox -->
|
||||
|
||||
Reference in New Issue
Block a user