Show DEFAULT text against the default card in the settings page

This commit is contained in:
PCoder 2017-10-28 20:45:00 +02:00
parent 2a59a3336b
commit 175180e193
2 changed files with 6 additions and 1 deletions

View file

@ -229,7 +229,8 @@ class UserCardDetail(AssignPermissionsMixin, models.Model):
)
for card in user_card_details:
cards_list.append({
'last4': card.last4, 'brand': card.brand, 'id': card.id
'last4': card.last4, 'brand': card.brand, 'id': card.id,
'preferred': card.preferred
})
return cards_list

View file

@ -64,7 +64,11 @@
</div>
</div>
<div class="col-xs-6 text-right">
{% if card.preferred %}
{% trans "DEFAULT" %}
{% else %}
<a class="btn choice-btn choice-btn-faded" href="">{% trans "SELECT" %}</a>
{% endif %}
</div>
</div>
</div>