<commit_before>{% extends '../layouts/dashboard.html' %}

{% block title %}{{title}}{% endblock %}

{% block content %}
  <div class="container-fluid container-max">
    <div class="page-header">
      <h1>Billing <small>/views/dashboard/billing</small></h1>
    </div>
    {% include "../partials/flash.html" %}
    {% if user.stripe.last4 %}
    <div class="page-header">
      <h3>Payment Details</h3>
    </div>
    <form role="form" id="cardForm" action="/user/billing" method="POST" class="form-horizontal">
      <div class="form-group">
        <label class="col-sm-3 control-label">Test Card Info</label>
        <div class="col-sm-7">
          <div class="form-control-static">4242424242424242, 11/19, 123 - <a href="https://stripe.com/docs/testing">additional test cards</a></div>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label">Card Number</label>
        <div class="col-sm-4">
          <input id="card-num" type="text" class="form-control" placeholder="XXXX XXXX XXXX {{user.stripe.last4}}">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label">Card Details</label>
        <div class="col-sm-4">
          <div class="row">
            <div class="col-xs-4">
              <input id="card-month" type="text" size="2" maxlength="2" class="form-control" placeholder="MM">
            </div>
            <div class="col-xs-4">
              <input id="card-year"  type="text" size="2" maxlength="2" class="form-control" placeholder="YY">
            </div>
            <div class="col-xs-4">
              <input id="card-cvc" type="text" size="3" maxlength="3" class="form-control" placeholder="CVC">
            </div>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-6">
          <div id="cardFormError" class="alert alert-danger hidden" role="alert">
            <p>{{error}}</p>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-4">
          <button type="submit" class="btn btn-primary">Update Card</button>
        </div>
      </div>
    </form>
    {% endif %}
    <div class="page-header">
      <h3>Subscription</h3>
    </div>
    <form {% if !user.stripe.last4 %}id="cardForm"{% endif %} action="/user/plan" method="POST" class="form-horizontal">
      <div class="form-group">
        <label for="plan" class="col-sm-3 control-label">Plan</label>
        <div class="col-sm-4">
          {% for plan in plans %}
            <div class="radio">
              <label>
                <input type="radio" {% if user.stripe.plan == loop.key %}checked{% endif %} name="plan" value="{{loop.key}}" data-toggle="radio">
                <span>{{plan.name}} - ${{plan.price}}</span>
              </label>
            </div>
          {% endfor %}
        </div>
      </div>
      {% if !user.stripe.last4 %}
      <div id="cardWrapper">
        <div class="form-group">
          <label class="col-sm-3 control-label">Test Card Info</label>
          <div class="col-sm-7">
            <div class="form-control-static">4242424242424242, 11/19, 123 - <a href="https://stripe.com/docs/testing">additional test info</a></div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">Card Number</label>
          <div class="col-sm-4">
            <input id="card-num" type="text" class="form-control">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">Card Details</label>
          <div class="col-sm-4">
            <div class="row">
              <div class="col-xs-4">
                <input id="card-month" type="text" size="2" maxlength="2" class="form-control" placeholder="MM">
              </div>
              <div class="col-xs-4">
                <input id="card-year"  type="text" size="2" maxlength="2" class="form-control" placeholder="YY">
              </div>
              <div class="col-xs-4">
                <input id="card-cvc" type="text" size="3" maxlength="3" class="form-control" placeholder="CVC">
              </div>
            </div>
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-6">
            <div id="cardFormError" class="alert alert-danger hidden" role="alert">
              <p>{{error}}</p>
            </div>
          </div>
        </div>
      </div>
      {% endif %}
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-4">
          <button type="submit" class="btn btn-primary">Update Plan</button>
        </div>
      </div>
    </form>

    <div class="page-header">
      <h3>Delete Account</h3>
    </div>
    <form action="/user/delete" method="POST" class="form-horizontal">
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-4"><button type="submit" class="btn btn-danger"><span class="ion-edit"></span>Delete Account</button></div>
      </div>
    </form>
  </div>
</div>
{% endblock %}<commit_msg>move payment info after plan section<commit_after>{% extends '../layouts/dashboard.html' %}

{% block title %}{{title}}{% endblock %}

{% block content %}
  <div class="container-fluid container-max">
    <div class="page-header">
      <h1>Billing <small>/views/dashboard/billing</small></h1>
    </div>
    {% include "../partials/flash.html" %}
    <div class="page-header">
      <h3>Subscription</h3>
    </div>
    <form {% if !user.stripe.last4 %}id="cardForm"{% endif %} action="/user/plan" method="POST" class="form-horizontal">
      <div class="form-group">
        <label for="plan" class="col-sm-3 control-label">Plan</label>
        <div class="col-sm-4">
          {% for plan in plans %}
            <div class="radio">
              <label>
                <input type="radio" {% if user.stripe.plan == loop.key %}checked{% endif %} name="plan" value="{{loop.key}}" data-toggle="radio">
                <span>{{plan.name}} - ${{plan.price}}</span>
              </label>
            </div>
          {% endfor %}
        </div>
      </div>
      {% if !user.stripe.last4 %}
      <div id="cardWrapper">
        <div class="form-group">
          <label class="col-sm-3 control-label">Test Card Info</label>
          <div class="col-sm-7">
            <div class="form-control-static">4242424242424242, 11/19, 123 - <a href="https://stripe.com/docs/testing">additional test info</a></div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">Card Number</label>
          <div class="col-sm-4">
            <input id="card-num" type="text" class="form-control">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">Card Details</label>
          <div class="col-sm-4">
            <div class="row">
              <div class="col-xs-4">
                <input id="card-month" type="text" size="2" maxlength="2" class="form-control" placeholder="MM">
              </div>
              <div class="col-xs-4">
                <input id="card-year"  type="text" size="2" maxlength="2" class="form-control" placeholder="YY">
              </div>
              <div class="col-xs-4">
                <input id="card-cvc" type="text" size="3" maxlength="3" class="form-control" placeholder="CVC">
              </div>
            </div>
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-6">
            <div id="cardFormError" class="alert alert-danger hidden" role="alert">
              <p>{{error}}</p>
            </div>
          </div>
        </div>
      </div>
      {% endif %}
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-4">
          <button type="submit" class="btn btn-primary">Update Plan</button>
        </div>
      </div>
    </form>

    {% if user.stripe.last4 %}
    <div class="page-header">
      <h3>Payment Details</h3>
    </div>
    <form role="form" id="cardForm" action="/user/billing" method="POST" class="form-horizontal">
      <div class="form-group">
        <label class="col-sm-3 control-label">Test Card Info</label>
        <div class="col-sm-7">
          <div class="form-control-static">4242424242424242, 11/19, 123 - <a href="https://stripe.com/docs/testing">additional test cards</a></div>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label">Card Number</label>
        <div class="col-sm-4">
          <input id="card-num" type="text" class="form-control" placeholder="XXXX XXXX XXXX {{user.stripe.last4}}">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label">Card Details</label>
        <div class="col-sm-4">
          <div class="row">
            <div class="col-xs-4">
              <input id="card-month" type="text" size="2" maxlength="2" class="form-control" placeholder="MM">
            </div>
            <div class="col-xs-4">
              <input id="card-year"  type="text" size="2" maxlength="2" class="form-control" placeholder="YY">
            </div>
            <div class="col-xs-4">
              <input id="card-cvc" type="text" size="3" maxlength="3" class="form-control" placeholder="CVC">
            </div>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-6">
          <div id="cardFormError" class="alert alert-danger hidden" role="alert">
            <p>{{error}}</p>
          </div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-4">
          <button type="submit" class="btn btn-primary">Update Card</button>
        </div>
      </div>
    </form>
    {% endif %}

    <div class="page-header">
      <h3>Delete Account</h3>
    </div>
    <form action="/user/delete" method="POST" class="form-horizontal">
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-4"><button type="submit" class="btn btn-danger"><span class="ion-edit"></span>Delete Account</button></div>
      </div>
    </form>
  </div>
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.19524551831644582, 'fraction_numerical': 0.019095869056897894, 'mean_word_length': 2.1021456633423994, 'pattern_counts': {'":': 0, '<': 295, '<?xml version=': 0, '>': 295, 'https://': 4, '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': '5377667', 'n_tokens_mistral': 3407, 'n_tokens_neox': 3247, 'n_words': 639}