Recettes : presque OK sur addToCart
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<span class="difficulte"><b>{intl l='Difficulty' d='recettes'}</b><img src="{image file='assets/img/cellular.svg' source='Recettes'}" alt="Difficulty">{$label_difficulty}</span>
|
||||
</div>
|
||||
<br>
|
||||
<form id="form-recette" action="/admin/module/Recettes/addtocart" method="post">
|
||||
<form id="form-recette" action="{url path='/admin/module/Recettes/addtocart'}" method="POST" class="clearfix">
|
||||
<div class="row">
|
||||
<div class="photo-principale col-md-4">
|
||||
{loop type="image" name="image-loop" content=$content_id visible=true}
|
||||
@@ -67,8 +67,8 @@
|
||||
<tr>
|
||||
<td class="cellule-large">{$PRODUCT_LABEL}</td>
|
||||
<td class="cellule-etroite">{$QUANTITY_NEEDED}</td>
|
||||
<td class="cellule-etroite">{$QUANTITY_PROPOSED}<input type="hidden" id="quantity-{$PSE_ID}" value="{$QUANTITY_PROPOSED}"></td>
|
||||
<td class="cellule-etroite"><input type="checkbox" id="product-{$PSE_ID}" name="selected-product" class="cellule-checkbox"></td>
|
||||
<td class="cellule-etroite">{$QUANTITY_PROPOSED} ({$UNITY})</td>
|
||||
<td class="cellule-etroite"><input type="checkbox" name="pseid-{$PSE_ID}-qty-{$QUANTITY_PROPOSED}" class="cellule-checkbox"></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
<tr>
|
||||
@@ -101,6 +101,9 @@
|
||||
{/loop}
|
||||
</article>
|
||||
<br>
|
||||
<button type="button" class="btn btn-primary bouton-imprimer">{intl l="Print recipe" d="recettes"}</button>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -114,7 +117,7 @@
|
||||
|
||||
$("#form-recette").off('submit').submit(function(ev) {
|
||||
|
||||
if ($('input[name=selected-product]:checked').length === 0) {
|
||||
if ($('input[name*=pseid-]:checked').length === 0) {
|
||||
alert("Vous n'avez choisi aucun produit à rajouter dans votre panier.");
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user