.row{ "ng-show" => "savedCreditCards != null && savedCreditCards.length > 0" }
  .small-12.columns
    %h6= t('.used_saved_card')
    %select{ name: "selected_card", required: false, ng: { model: "secrets.selected_card", options: "card.id as card.formatted for card in savedCreditCards" } }
      %option{ value: "" }= "{{ secrets.selected_card ? '#{t('.enter_new_card')}' : '#{t('.choose_one')}' }}"

    %h6{ ng: { if: '!secrets.selected_card' } }
      = t('.or_enter_new_card')

%div{ ng: { if: '!secrets.selected_card' } }
  = render "spree/checkout/payment/gateway", payment_method: payment_method

.row
  .small-12.columns.text-right
    = check_box_tag 'secrets.save_requested_by_customer'
    = label_tag 'secrets.save_requested_by_customer', t('.remember_this_card')

:javascript
  Stripe.setPublishableKey("#{ENV['STRIPE_INSTANCE_PUBLISHABLE_KEY']}")

.row{ "ng-show" => "savedCreditCards != null && savedCreditCards.length > 0" }
  .small-12.columns
    %h6= t('.used_saved_card')
    %select{ name: "selected_card", required: false, ng: { model: "secrets.selected_card", options: "card.id as card.formatted for card in savedCreditCards" } }
      %option{ value: "" }= "{{ secrets.selected_card ? '#{t('.enter_new_card')}' : '#{t('.choose_one')}' }}"

    %h6{ ng: { if: '!secrets.selected_card' } }
      = t('.or_enter_new_card')

%div{ ng: { if: '!secrets.selected_card' } }
  = render "spree/checkout/payment/gateway", payment_method: payment_method

  .row
    .small-12.columns.text-right
      = check_box_tag 'secrets.save_requested_by_customer'
      = label_tag 'secrets.save_requested_by_customer', t('.remember_this_card')

:javascript
  Stripe.setPublishableKey("#{ENV['STRIPE_INSTANCE_PUBLISHABLE_KEY']}")

Hide option to 'Remember this card' when an existing card is selected
Hide option to 'Remember this card' when an existing card is selected
