<commit_before>{% extends "shop/base.html" %}
{% load shop_tags mezzanine_tags i18n future %}

{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %}
{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %}
{% block body_id %}checkout{% endblock %}

{% block extra_head %}
<script>
var _gaq = [['_trackPageview', '{{ request.path }}{{ step_url }}/']];
$(function() {$('.middle :input:visible:enabled:first').focus();});
</script>
{% endblock %}

{% block breadcrumb_menu %}
{% for step in steps %}
<li>
	{% if step.title == step_title %}
	<strong>{{ step.title }}</strong>
	{% else %}
	{{ step.title }}
	{% endif %}
	<span class="divider">/</span>
</li>
{% endfor %}
<li>{% trans "Complete" %}</li>
{% endblock %}

{% block main %}

{% block before-form %}{% endblock %}

{% if request.cart.has_items %}
<div class="panel checkout-panel span3">
<ul class="unstyled">
{% for item in request.cart %}
<li>
	{% if item.image %}
	<img alt="{{ item.description }}" src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}">
	{% endif %}
	{{ item.quantity }} x {{ item.description }}
	<span class="price">{{ item.total_price|currency }}</span>
</li>
{% endfor %}
</ul>
{% order_totals %}
<br style="clear:both;">
<a class="btn" href="{% url "shop_cart" %}">{% trans "Edit Cart" %}</a>
</div>
{% endif %}

<form method="post" id="checkout-form" class="form-horizontal form-shop span8">
	{% csrf_token %}

	{% with form.non_field_errors as errors %}
	{% if errors or form.errors %}
	<div class="control-group error non-field-errors">
		{% for error in errors %}
		<span class="help-inline">{{ error }}</span>
		{% empty %}
		<span class="help-inline">{% trans "Please correct the errors below." %}</span>
		{% endfor %}
	</div>
	{% endif %}
	{% endwith %}

	{% block fields %}{% endblock %}

	{% block nav-buttons %}
		{% if request.cart.has_items %}
			<div class="form-actions clearfix">
				<div class="form-actions-wrap">
					<input type="submit" class="btn btn-large btn-primary" value="{% if CHECKOUT_STEP_LAST %}{% trans "Complete" %}{% else %}{% trans "Next" %}{% endif %}">
					{% if not CHECKOUT_STEP_FIRST %}
					<input type="submit" class="btn btn-large" name="back" value="{% trans "Back" %}">
					{% endif %}
				</div>
			</div>
		{% else %}
			<p>{% trans "Your cart is empty." %}</p>
			<p>{% trans "This may be due to your session timing out after a period of inactivity." %}</p>
			<p>{% trans "We apologize for the inconvenience." %}</p>
			<br>
			<p><a class="btn btn-large btn-primary" href="{% url "page" "shop" %}">{% trans "Continue Shopping" %}</a></p>
		{% endif %}
	{% endblock %}

</form>

{% block after-form %}{% endblock after-form %}

{% endblock %}<commit_msg>upgrade to BS3<commit_after>{% extends "shop/base.html" %}
{% load shop_tags mezzanine_tags i18n future %}

{% block meta_title %}{% trans "Checkout" %} - {{ step_title }}{% endblock %}
{% block title %}{% trans "Checkout" %} - {% trans "Step" %} {{ step }} {% trans "of" %} {{ steps|length }}{% endblock %}
{% block body_id %}checkout{% endblock %}

{% block extra_head %}
<script>
var _gaq = [['_trackPageview', '{{ request.path }}{{ step_url }}/']];
$(function() {$('.middle :input:visible:enabled:first').focus();});
</script>
{% endblock %}

{% block breadcrumb_menu %}
{% for step in steps %}
<li>
	{% if step.title == step_title %}
	<strong>{{ step.title }}</strong>
	{% else %}
	{{ step.title }}
	{% endif %}
</li>
{% endfor %}
<li>{% trans "Complete" %}</li>
{% endblock %}

{% block main %}

{% block before-form %}{% endblock %}

{% if request.cart.has_items %}
<div class="panel panel-default checkout-panel col-md-3">
<div class="panel-body">
<ul class="list-unstyled">
{% for item in request.cart %}
<li>
	{% if item.image %}
	<img alt="{{ item.description }}" src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}">
	{% endif %}
	{{ item.quantity }} x {{ item.description }}
	<span class="price">{{ item.total_price|currency }}</span>
</li>
{% endfor %}
</ul>
{% order_totals %}
<br style="clear:both;">
<a class="btn btn-default" href="{% url "shop_cart" %}">{% trans "Edit Cart" %}</a>
</div>
</div>
{% endif %}

<form method="post" class="col-md-8 checkout-form">
	{% csrf_token %}

	{% with form.non_field_errors as errors %}
	{% if errors or form.errors %}
	<div class="alert alert-danger">
		{% for error in errors %}
		<p>{{ error }}</p>
		{% empty %}
		<p>{% trans "Please correct the errors below." %}</p>
		{% endfor %}
	</div>
	{% endif %}
	{% endwith %}

	{% block fields %}{% endblock %}
	
	{% block nav-buttons %}
		{% if request.cart.has_items %}
			<div class="form-actions clearfix">
				<div class="form-actions-wrap">
				<input type="submit" class="btn btn-lg btn-primary" value="{% trans "Next" %}">
				{% if not CHECKOUT_STEP_FIRST %}
				<input type="submit" class="btn btn-lg btn-default" name="back" value="{% trans "Back" %}">
				{% endif %}
				</div>
			</div>
		{% else %}
			<p>{% trans "Your cart is empty." %}</p>
			<p>{% trans "This may be due to your session timing out after a period of inactivity." %}</p>
			<p>{% trans "We apologize for the inconvenience." %}</p>
			<br>
			<p><a class="btn btn-lg btn-primary" href="{% url "page" "shop" %}">{% trans "Continue Shopping" %}</a></p>
		{% endif %}
	{% endblock %}

</form>

{% block after-form %}{% endblock after-form %}

{% endblock %}
{'fraction_non_alphanumeric': 0.23139427516158817, 'fraction_numerical': 0.003139427516158818, 'mean_word_length': 3.996309963099631, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, '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': '6976122', 'n_tokens_mistral': 2214, 'n_tokens_neox': 1874, 'n_words': 507}