Format card label in card selector

This commit is contained in:
Jean-Baptiste Bellet
2021-11-25 15:32:41 +01:00
committed by Matt-Yorkley
parent 68e4d55f80
commit 34ce08d901

View File

@@ -7,7 +7,7 @@
.checkout-input
%label
= t('split_checkout.step2.form.stripe.use_saved_card')
= select_tag :card, options_for_select(@saved_credit_cards.map {|cc| [ cc.id, "#{cc.brand} #{cc.number}" ] }, @selected_card)
= select_tag :card, options_for_select(@saved_credit_cards.map {|cc| [ "#{cc.brand} #{cc.last_digits} #{I18n.t(:card_expiry_abbreviation)}:#{cc.month.to_s.rjust(2, '0')}/#{cc.year}", cc.id ] }, @selected_card)
.checkout-input
- if @saved_credit_cards.length > 0