Highlight baskets missing payment method

This commit is contained in:
Gabriel Augendre 2022-04-25 19:03:16 +02:00
parent 13fd6a27a8
commit ef4672ca15
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,9 @@
{% load crispy_forms_tags purchase %} {% load crispy_forms_tags purchase %}
{% block content %} {% block content %}
{% if object %} {% if object %}
{% if not object.payment_method %}
<div class="alert alert-warning" role="alert">Missing payment method.</div>
{% endif %}
<h1>{{ object }}</h1> <h1>{{ object }}</h1>
<p>{{ object.created_at }}</p> <p>{{ object.created_at }}</p>
{% else %} {% else %}

View file

@ -5,7 +5,7 @@
<div class="row row-cols-auto g-4"> <div class="row row-cols-auto g-4">
{% for basket in baskets %} {% for basket in baskets %}
<div class="col"> <div class="col">
<div class="card h-100"> <div class="card h-100 {% if not basket.payment_method %}bg-warning text-black{% endif %}">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">Basket #{{ basket.id }}</h5> <h5 class="card-title">Basket #{{ basket.id }}</h5>
<p class="card-text"> <p class="card-text">