bootstrap modif css

This commit is contained in:
Jonas 12t 2021-09-25 20:07:16 +04:00
parent ba7d4af4d6
commit ff3e18c078
2 changed files with 15 additions and 8 deletions

View File

@ -11,7 +11,7 @@
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<!-- Bootstrap core CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
{# <link href="css/mdb.min.css" rel="stylesheet">#}
<!-- Your custom styles (optional) -->
@ -19,6 +19,12 @@
</head>
<body>
<br>
{% if url_image_carte %}
<div class="container-fluid">
<img src="{{ url_image_carte }}" alt="Product" class="img-fluid img-thumbnail rounded mx-auto d-block" >
</div>
{% endif %}
<br>
<p class="h3 mb-4 text-center">Rechargement Cashless {{ domain.capitalize }}</p>
{% if liste_assets %}
<p class="h5 mb-5 text-center">Disponible sur votre carte :
@ -29,12 +35,10 @@
{% else %}
<p class="h4 mb-4 text-center">Votre carte est vide.</p>
{% endif %}
<br>
<form class="border border-light p-5" name="form" method="POST">
{% csrf_token %}
<label for="numero_carte">Merci de vérifier votre numéro de la carte cashless ( au dessous du QRCode ) :</label>
<input type="text" id="numero_carte_cashless" class="form-control" placeholder="Numéro de la carte cashless"
value="{{ numero_carte }}" name="numero_carte_cashless" required="True" readonly>
@ -48,13 +52,15 @@
<input type="email" id="Email" class="form-control mb-4" placeholder="E-mail" name="email" required="True">
{% endif %}
<br>
<label for="thune">Somme à recharger (€) :</label>
<input id="thune" class="form-control" type="number" min="1" step="any" name="thune" required="True"/>
<br>
<button class="btn btn-info btn-block" type="submit">Payer</button>
<div class="d-grid gap-2">
<button class="btn btn-primary" type="submit">Payer</button>
</div>
</form>
</body>

View File

@ -96,6 +96,7 @@ class index_scan(View):
request,
self.template_name,
{
'url_image_carte': carte.detail.img_url,
'numero_carte': carte.number,
'domain': sub_addr,
'informations_carte': reponse_server_cashless.text,
@ -122,7 +123,7 @@ class index_scan(View):
montant_recharge = float(data.get('thune'))
configuration = Configuration.get_solo()
if data.get('numero_carte_cashless') == str(uuid).split('-')[0].upper() and \
if data.get('numero_carte_cashless') == carte.number and \
reponse_server_cashless.status_code == 200 and \
montant_recharge > 0: