Files
2023-06-22 10:26:17 +02:00

80 lines
2.5 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<div class="row col-md-7">
<h3>1 - Sélectionner une quantité</h3>
<form id="crediter-form" action="${url}" method="post"
class="form-horizontal"
data-fv-framework="bootstrap"
data-fv-icon-valid="glyphicon glyphicon-ok"
data-fv-icon-invalid="glyphicon glyphicon-remove"
data-fv-icon-validating="glyphicon glyphicon-refresh">
<table class="table table-striped table-bordered">
<tr>
<th>Désignation</th>
<th>Prix TTC</th>
<th>Quantité</th>
</tr>
<tr tal:repeat="item items">
<td tal:content="item.LIB" />
<td align="right">
<span tal:content="layout.to_euro(item.PUTTC)" />
</td>
<td>
<select class="form-control" id="${item.REF}" name="${item.REF}">
<tal:block tal:repeat="i [x for x in range(0,9)]">
<option tal:condition="str(i)==qtes[repeat.item.index]" selected>${i}</option>
<option tal:condition="str(i)!=qtes[repeat.item.index]">${i}</option>
</tal:block>
</select>
</td>
</tr>
</table>
<div class="form-group">
<button class="btn btn-primary" type="submit" name="form.submitted">
<span class="glyphicon glyphicon-refresh"></span>&nbsp;Calculer le montant total</button>
</div>
<!-- lire le total calculer -->
<div tal:condition="mttotal">
<h3>2 - Régler</h3>
<h4>Montant total à régler : <b><span class="text-danger">${layout.to_euro(mttotal)}</span></b></h4>
<!-- case a cocher "Accepter CGV" -->
<div class="form-group">
<div class="checkbox">
<input type="checkbox" name="cb_cgv" id="cb_binaire" class="styled" />
<label for="cb_binaire">En cochant cette case, je reconnais avoir lu et accepté les <a href="http://www.marietton.com/files/CGV-Marietton.pdf">Conditions Générales de Vente</a>.</label>
</div>
</div>
<div class="form-group">
<button class="btn btn-primary" type="submit" name="regler.submitted">
<span class="glyphicon glyphicon-euro"></span>&nbsp;Régler</button>
<img src="${request.static_url('monaem:static/img/CB.gif')}" alt="CB logo" title="CB logo" />
</div>
</div>
</form>
</div>
<script>
$(document).ready(function() {
$('#crediter-form').formValidation({
fields: {
cb_cgv: {
validators: {
notEmpty: {
message: 'Veuillez accepter les Conditions Générales de Vente pour continuer.'
}
}
},
}
});
});
</script>
</div><!-- content -->
</metal:block>