8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 14:42:25 +00:00

Affiche le rechargement si le moyen de paiement est défini.

This commit is contained in:
Hugo LEVY-FALK 2018-01-27 00:32:13 +01:00 committed by root
parent c7d5b7a39b
commit 9123822e3a
2 changed files with 5 additions and 2 deletions

View file

@ -132,7 +132,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>Aucun</td> <td>Aucun</td>
{% endif %} {% endif %}
</tr> </tr>
{% if user_solde %} {% if allow_online_payment %}
<tr> <tr>
<th>Solde</th> <th>Solde</th>
<td>{{ users.solde }} € <td>{{ users.solde }} €

View file

@ -85,7 +85,7 @@ from users.forms import (
) )
from cotisations.models import Facture from cotisations.models import Facture
from machines.models import Machine from machines.models import Machine
from preferences.models import OptionalUser, GeneralOption from preferences.models import OptionalUser, GeneralOption, AssoOption
from re2o.views import form from re2o.views import form
from re2o.utils import ( from re2o.utils import (
@ -782,6 +782,8 @@ def profil(request, users, userid):
) )
options, _created = OptionalUser.objects.get_or_create() options, _created = OptionalUser.objects.get_or_create()
user_solde = options.user_solde user_solde = options.user_solde
options, _created = AssoOption.objects.get_or_create()
allow_online_payment = options.payment != 'NONE'
return render( return render(
request, request,
'users/profil.html', 'users/profil.html',
@ -792,6 +794,7 @@ def profil(request, users, userid):
'ban_list': bans, 'ban_list': bans,
'white_list': whitelists, 'white_list': whitelists,
'user_solde': user_solde, 'user_solde': user_solde,
'allow_online_payment' : allow_online_payment,
} }
) )