Browse Source

fix: Use bootstrap class for fa-check and fa-times color instead of hardcoded value

release-2.9
Jean-Romain Garnier 5 years ago
committed by Gabriel Detraz
parent
commit
fdb0b0b10f
  1. 4
      cotisations/templates/cotisations/aff_cost_estimate.html
  2. 4
      re2o/templatetags/design.py

4
cotisations/templates/cotisations/aff_cost_estimate.html

@ -73,9 +73,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ estimate.id }}</td> <td>{{ estimate.id }}</td>
<td> <td>
{% if estimate.final_invoice %} {% if estimate.final_invoice %}
<a href="{% url 'cotisations:edit-custom-invoice' estimate.final_invoice.pk %}"><i style="color: #1ECA18;" class="fa fa-check"></i></a> <a href="{% url 'cotisations:edit-custom-invoice' estimate.final_invoice.pk %}"><i class="fa fa-check text-success"></i></a>
{% else %} {% else %}
<i style="color: #D10115;" class="fa fa-times"></i> <i class="fa fa-times text-danger"></i>
{% endif %} {% endif %}
</td> </td>
<td> <td>

4
re2o/templatetags/design.py

@ -31,9 +31,9 @@ def tick(valeur, autoescape=False):
if isinstance(valeur, bool): if isinstance(valeur, bool):
if valeur == True: if valeur == True:
result = '<i style="color: #1ECA18;" class="fa fa-check"></i>' result = '<i class="fa fa-check text-success"></i>'
else: else:
result = '<i style="color: #D10115;" class="fa fa-times"></i>' result = '<i class="fa fa-times text-danger"></i>'
return mark_safe(result) return mark_safe(result)
else: # if the value is not a boolean, display it as if tick was not called else: # if the value is not a boolean, display it as if tick was not called

Loading…
Cancel
Save