Recettes : plus qu'à faire l'appel au addtocart, pour le frontOffice
This commit is contained in:
@@ -42,6 +42,7 @@ div.entete span b {
|
|||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
color: #95c11e;
|
color: #95c11e;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.recette-soustitre {
|
.recette-soustitre {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -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>
|
<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>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<form action="/admin/module/Recettes/addtocart" method="post">
|
<form id="form-recette" action="/admin/module/Recettes/addtocart" method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="photo-principale col-md-4">
|
<div class="photo-principale col-md-4">
|
||||||
{loop type="image" name="image-loop" content=$content_id visible=true}
|
{loop type="image" name="image-loop" content=$content_id visible=true}
|
||||||
@@ -68,12 +68,16 @@
|
|||||||
<td class="cellule-large">{$PRODUCT_LABEL}</td>
|
<td class="cellule-large">{$PRODUCT_LABEL}</td>
|
||||||
<td class="cellule-etroite">{$QUANTITY_NEEDED}</td>
|
<td class="cellule-etroite">{$QUANTITY_NEEDED}</td>
|
||||||
<td class="cellule-etroite">{$QUANTITY_PROPOSED}</td>
|
<td class="cellule-etroite">{$QUANTITY_PROPOSED}</td>
|
||||||
<td class="cellule-etroite"><input type="checkbox" id="product-{$PSE_ID}" class="cellule-checkbox"></td>
|
<td class="cellule-etroite"><input type="checkbox" id="product-{$PSE_ID}" name="selected-product" class="cellule-checkbox"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/loop}
|
{/loop}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"></td>
|
<td colspan="3"></td>
|
||||||
<td><input type="submit" class="button recette-bouton" value="{intl l='Add to cart' d='recettes'}"></td>
|
<td>
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary">{intl l='Add to cart' d='recettes'}</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -85,7 +89,6 @@
|
|||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="row">
|
|
||||||
<table class="table table-striped table-steps">
|
<table class="table table-striped table-steps">
|
||||||
{loop type="recipe_steps" name="steps-loop" recipe_id=$ID}
|
{loop type="recipe_steps" name="steps-loop" recipe_id=$ID}
|
||||||
<tr>
|
<tr>
|
||||||
@@ -105,3 +108,17 @@
|
|||||||
{block name="stylesheet"}
|
{block name="stylesheet"}
|
||||||
{hook name="content.stylesheet"}
|
{hook name="content.stylesheet"}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{block name="after-javascript-include"}
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$("#form-recette").off('submit').submit(function(ev) {
|
||||||
|
|
||||||
|
if ($('input[name=selected-product]:checked').length === 0) {
|
||||||
|
alert("Vous n'avez choisi aucun produit à rajouter dans votre panier.");
|
||||||
|
ev.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
Reference in New Issue
Block a user