mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Simplify partial selecting and rename stripe_sca partial
This commit is contained in:
@@ -21,12 +21,9 @@
|
||||
- if payment_method.description && !payment_method.description.empty?
|
||||
.paymentmethod-description.panel
|
||||
#{payment_method.description}
|
||||
|
||||
.paymentmethod-form
|
||||
- if payment_method.method_type == "stripe_sca"
|
||||
- method = "stripe"
|
||||
-else
|
||||
- method = payment_method.method_type
|
||||
= render partial: "split_checkout/payment/#{method}", locals: { payment_method: payment_method, f: f }
|
||||
= render partial: "split_checkout/payment/#{payment_method.method_type}", locals: { payment_method: payment_method, f: f }
|
||||
|
||||
%div.checkout-substep
|
||||
= t("split_checkout.step2.explaination")
|
||||
|
||||
@@ -8,7 +8,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.brand} #{cc.last_digits} #{I18n.t(:card_expiry_abbreviation)}:#{cc.month.to_s.rjust(2, '0')}/#{cc.year}", cc.id ] } + [[t('split_checkout.step2.form.stripe.create_new_card'), ""]], @selected_card), { "data-action": "change->stripe#onSelectCard", "data-stripe-target": "select" }
|
||||
= 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 ] } + [[t('split_checkout.step2.form.stripe.create_new_card'), ""]], @selected_card), { "data-action": "change->stripe#onSelectCard", "data-stripe-target": "select" }
|
||||
|
||||
.checkout-input{"data-stripe-target": "stripeelements"}
|
||||
- if @saved_credit_cards.length == 0
|
||||
Reference in New Issue
Block a user