correction bug chrome
This commit is contained in:
parent
65fd60ce26
commit
9aa052b23f
|
|
@ -294,8 +294,8 @@
|
||||||
<div class="field" style="display: none">
|
<div class="field" style="display: none">
|
||||||
<input id="pk_adhesion" type="text" name="pk_adhesion"
|
<input id="pk_adhesion" type="text" name="pk_adhesion"
|
||||||
required="True"/>
|
required="True"/>
|
||||||
<input id="montant_adhesion" type="number" step="any" name="montant_adhesion"
|
{# <input id="montant_adhesion" type="number" step="any" name="montant_adhesion"#}
|
||||||
required="True"/>
|
{# required="True"/>#}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
@ -399,7 +399,7 @@
|
||||||
{% for tarif in tarifs_adhesion %}
|
{% for tarif in tarifs_adhesion %}
|
||||||
document.getElementById('{{ tarif.name | slugify }}').onclick = function () {
|
document.getElementById('{{ tarif.name | slugify }}').onclick = function () {
|
||||||
console.log('{{ tarif.name | slugify }}')
|
console.log('{{ tarif.name | slugify }}')
|
||||||
document.getElementById("montant_adhesion").value = "{{ tarif.prix }}";
|
{#document.getElementById("montant_adhesion").value = "{{ tarif.prix }}";#}
|
||||||
document.getElementById("pk_adhesion").value = "{{ tarif.pk }}";
|
document.getElementById("pk_adhesion").value = "{{ tarif.pk }}";
|
||||||
document.getElementById("text_name_adhesion").textContent = "{{ tarif.name }}";
|
document.getElementById("text_name_adhesion").textContent = "{{ tarif.name }}";
|
||||||
document.getElementById("text_tarif_adhesion").textContent = "{{ tarif.prix }}€";
|
document.getElementById("text_tarif_adhesion").textContent = "{{ tarif.prix }}€";
|
||||||
|
|
|
||||||
|
|
@ -152,11 +152,12 @@ class index_scan(View):
|
||||||
|
|
||||||
data = request.POST
|
data = request.POST
|
||||||
print(data)
|
print(data)
|
||||||
montant_adhesion = data.get('montant_adhesion')
|
# montant_adhesion = data.get('montant_adhesion')
|
||||||
|
pk_adhesion = data.get('pk_adhesion')
|
||||||
montant_recharge = data.get('montant_recharge')
|
montant_recharge = data.get('montant_recharge')
|
||||||
|
|
||||||
# c'est un paiement
|
# c'est un paiement
|
||||||
if (montant_adhesion or montant_recharge) and data.get('email'):
|
if ( pk_adhesion or montant_recharge ) and data.get('email'):
|
||||||
# montant_recharge = data.get('montant_recharge')
|
# montant_recharge = data.get('montant_recharge')
|
||||||
ligne_articles = []
|
ligne_articles = []
|
||||||
metadata = {}
|
metadata = {}
|
||||||
|
|
@ -178,7 +179,7 @@ class index_scan(View):
|
||||||
|
|
||||||
metadata['recharge_carte_montant'] = str(montant_recharge)
|
metadata['recharge_carte_montant'] = str(montant_recharge)
|
||||||
|
|
||||||
if montant_adhesion:
|
if pk_adhesion:
|
||||||
art_adhesion = Article.objects.get(pk=data.get('pk_adhesion'))
|
art_adhesion = Article.objects.get(pk=data.get('pk_adhesion'))
|
||||||
ligne_article_recharge = LigneArticle.objects.create(
|
ligne_article_recharge = LigneArticle.objects.create(
|
||||||
article=art_adhesion,
|
article=art_adhesion,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue