<commit_before>{% extends 'checkout/base.jinja' %}

{% from '_helpers.jinja' import render_field %}

{% set checkout_step = 3 %}
{% set checkout_step_name = _('Select a payment method') %}


{% block main %}
<section class="checkout-container">
  <div class="container">
    <!--Payment Section-->
    <div class="row">
      <div class="delivery-address">
        <div class="col-md-7 col-sm-7 col-xs-12">
          {% block saved_cards %}
          {% if request.nereid_website.accept_credit_card and current_user.is_authenticated() and current_user.party.payment_profiles %}
          <div class="payment-container">              
            <h4><span class="underline">{{ _('Your saved credit and debit cards') }}</span></h4>

            <form class="form-horizontal tab-content" 
              role="form" method="POST"
              id="pay-from-credit-card" autocomplete="off">
              {{ credit_card_form.csrf_token }}
              <div class="shipment">
                {% for card in current_user.party.payment_profiles %}
                <p class="shipping-method">
                  <label>
                    <span class="button">
                      <input type="radio" class="select-card" value="{{ card.id }}" name="payment_profile">
                    </span>
                    <span class="info">
                      <span class="delivery-date">
                        XXXX XXXX XXXX {{ card.last_4_digits }}
                      </span>
                      <span class="rate">
                        Expiry: {{ card.expiry_month }}/{{ card.expiry_year }}
                      </span>
                    </span>
                  </label>            
                </p>
                {% endfor %}                  
              </div>
              <button type="submit" class="btn btn-warning btn-lg btn-block" id="payment-btn">
                <i class="fa fa-lock"></i>
                {{ _('Pay Now') }}
                <i class="fa fa-spin fa-spinner hidden"></i>
              </button>                
            </form>
          </div>
          {% endif %}
          {% endblock saved_cards %}

          {% block add_card %}
          {% if request.nereid_website.accept_credit_card %}
          <div class="payment-container">
            <h4><span class="underline">{{ _('Add a new card') }}</span></h4>
            <form class="form-horizontal tab-content" role="form" method="POST" id="pay-from-credit-card" autocomplete="off">
              {{ credit_card_form.csrf_token }}              
              <!-- Credit card-->
              <div class="" id="credit-card">
                {{ render_field(credit_card_form.number, class_="input-lg form-control", pattern="[0-9]*", maxlength="16", minlength="13") }}
                {{ render_field(credit_card_form.owner, class_="input-lg form-control") }}
                <div class="row">
                  <div class="col-xs-6">
                    {{ render_field(credit_card_form.expiry_month, class_="input-lg form-control") }}
                  </div>
                  <div class="col-xs-6">
                    {{ render_field(credit_card_form.expiry_year, class_="input-lg form-control") }}
                  </div>
                </div>
                <div class="row">
                  <div class="col-xs-6">
                    {{ render_field(credit_card_form.cvv, class_="input-lg form-control", pattern="[0-9]*", minlength="3", maxlength="4") }}
                  </div>
                </div>
                {% if current_user.is_authenticated() and request.nereid_website.save_payment_profile %}
                <div class="checkbox">
                  {{ credit_card_form.add_card_to_profiles }}
                  <label for="add_card_to_profiles">{{ _('Save Card') }}</label>
                </div>
                {% endif %}
                <div class="checkbox">
                  {{ payment_form.use_shipment_address }}
                  <label for="use_shipment_address">{{ _('Use shipping address as billing address') }}</label>
                </div>
              </div>
              <button type="submit" class="btn btn-warning btn-lg btn-block" id="payment-btn">
                <i class="fa fa-lock"></i>
                {{ _('Pay Now') }}
                <i class="fa fa-spin fa-spinner hidden"></i>
              </button>
            </form>
          </div>
          {% endif %}
          {% endblock add_card %}

          {% block alternate_methods %}
          {% if payment_form.alternate_payment_method.choices %}
          <div class="payment-container">
            <h4><span class="underline">{{ _('More Payment methods') }}</span></h4>
            {% for method_id, method_name in payment_form.alternate_payment_method.choices %}
            <div class="tab-pane center" id="method-{{ method_id }}">
              {% set method = PaymentMethod(method_id) %}
              <p><strong><span class="text-success">{{ method.instructions|safe }}</strong></p><commit_msg>Fixed alignment of checkbox on payment page<commit_after>{% extends 'checkout/base.jinja' %}

{% from '_helpers.jinja' import render_field %}

{% set checkout_step = 3 %}
{% set checkout_step_name = _('Select a payment method') %}


{% block main %}
<section class="checkout-container">
  <div class="container">
    <!--Payment Section-->
    <div class="row">
      <div class="delivery-address">
        <div class="col-md-7 col-sm-7 col-xs-12">
          {% block saved_cards %}
          {% if request.nereid_website.accept_credit_card and current_user.is_authenticated() and current_user.party.payment_profiles %}
          <div class="payment-container">              
            <h4><span class="underline">{{ _('Your saved credit and debit cards') }}</span></h4>

            <form class="form-horizontal tab-content" 
              role="form" method="POST"
              id="pay-from-credit-card" autocomplete="off">
              {{ credit_card_form.csrf_token }}
              <div class="shipment">
                {% for card in current_user.party.payment_profiles %}
                <p class="shipping-method">
                  <label>
                    <span class="button">
                      <input type="radio" class="select-card" value="{{ card.id }}" name="payment_profile">
                    </span>
                    <span class="info">
                      <span class="delivery-date">
                        XXXX XXXX XXXX {{ card.last_4_digits }}
                      </span>
                      <span class="rate">
                        Expiry: {{ card.expiry_month }}/{{ card.expiry_year }}
                      </span>
                    </span>
                  </label>            
                </p>
                {% endfor %}                  
              </div>
              <button type="submit" class="btn btn-warning btn-lg btn-block" id="payment-btn">
                <i class="fa fa-lock"></i>
                {{ _('Pay Now') }}
                <i class="fa fa-spin fa-spinner hidden"></i>
              </button>                
            </form>
          </div>
          {% endif %}
          {% endblock saved_cards %}

          {% block add_card %}
          {% if request.nereid_website.accept_credit_card %}
          <div class="payment-container">
            <h4><span class="underline">{{ _('Add a new card') }}</span></h4>
            <form class="form-horizontal tab-content" role="form" method="POST" id="pay-from-credit-card" autocomplete="off">
              {{ credit_card_form.csrf_token }}              
              <!-- Credit card-->
              <div class="" id="credit-card">
                {{ render_field(credit_card_form.number, class_="input-lg form-control", pattern="[0-9]*", maxlength="16", minlength="13") }}
                {{ render_field(credit_card_form.owner, class_="input-lg form-control") }}
                <div class="row">
                  <div class="col-xs-6">
                    {{ render_field(credit_card_form.expiry_month, class_="input-lg form-control") }}
                  </div>
                  <div class="col-xs-6">
                    {{ render_field(credit_card_form.expiry_year, class_="input-lg form-control") }}
                  </div>
                </div>
                <div class="row">
                  <div class="col-xs-6">
                    {{ render_field(credit_card_form.cvv, class_="input-lg form-control", pattern="[0-9]*", minlength="3", maxlength="4") }}
                  </div>
                </div>
                {% if current_user.is_authenticated() and request.nereid_website.save_payment_profile %}
                <div class="checkbox">
                  {{ credit_card_form.add_card_to_profiles }}
                  <label for="add_card_to_profiles">{{ _('Save Card') }}</label>
                </div>
                {% endif %}
                <div class="checkbox">
                  <label for="use_shipment_address">
                    {{ payment_form.use_shipment_address }} {{ _('Use shipping address as billing address') }}
                  </label>
                </div>
              </div>
              <button type="submit" class="btn btn-warning btn-lg btn-block" id="payment-btn">
                <i class="fa fa-lock"></i>
                {{ _('Pay Now') }}
                <i class="fa fa-spin fa-spinner hidden"></i>
              </button>
            </form>
          </div>
          {% endif %}
          {% endblock add_card %}

          {% block alternate_methods %}
          {% if payment_form.alternate_payment_method.choices %}
          <div class="payment-container">
            <h4><span class="underline">{{ _('More Payment methods') }}</span></h4>
            {% for method_id, method_name in payment_form.alternate_payment_method.choices %}
            <div class="tab-pane center" id="method-{{ method_id }}">
              {% set method = PaymentMethod(method_id) %}
              <p><strong><span class="text-success">{{ method.instructions|safe }}</strong></p>
{'fraction_non_alphanumeric': 0.1483168316831683, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 1.6215935634570464, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6098283', 'n_tokens_mistral': 2934, 'n_tokens_neox': 2673, 'n_words': 529}