Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve indentation consistency in templates

Rafał Pitoń6e5396b3c024
diff --git a/templates/account/login.html b/templates/account/login.html
index 872c5cd78b..05a4c68a00 100644
--- a/templates/account/login.html
+++ b/templates/account/login.html
@@ -9,7 +9,6 @@
{% endblock meta_tags %}
{% block content %}
-
<div class="col-lg-10 col-sm-12 m-auto">
<div class="row login">
<div class="col-md-6 login__register">
@@ -28,5 +27,4 @@
</div>
</div>
</div>
-
{% endblock %}
diff --git a/templates/account/password_set.html b/templates/account/password_set.html
index 2387d3b9ce..c08332212c 100644
--- a/templates/account/password_set.html
+++ b/templates/account/password_set.html
@@ -5,25 +5,25 @@
{% block content %}
<div class="row">
<div class="col-sm-6">
- <div class="panel panel-default">
- <div class="panel-body">
- <form method="post" novalidate action="{% url "account_set_password" %}">
- {% csrf_token %}
- <fieldset>
- <legend class="text-center">
- {% trans "Password Reset" context "Password set form legend" %}
- </legend>
- {% bootstrap_form form %}
- <input type="hidden" name="next" value="{{ next }}" />
- </fieldset>
- <div class="form-group text-right">
- <button class="btn primary">
- {% trans "Continue" context "Password set form primary action" %}
- </button>
- </div>
- </form>
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <form method="post" novalidate action="{% url "account_set_password" %}">
+ {% csrf_token %}
+ <fieldset>
+ <legend class="text-center">
+ {% trans "Password Reset" context "Password set form legend" %}
+ </legend>
+ {% bootstrap_form form %}
+ <input type="hidden" name="next" value="{{ next }}" />
+ </fieldset>
+ <div class="form-group text-right">
+ <button class="btn primary">
+ {% trans "Continue" context "Password set form primary action" %}
+ </button>
</div>
+ </form>
</div>
+ </div>
</div>
</div>
{% endblock %}
diff --git a/templates/account/signup.html b/templates/account/signup.html
index e7eb9385ff..95a94120c5 100644
--- a/templates/account/signup.html
+++ b/templates/account/signup.html
@@ -29,8 +29,8 @@
{% csrf_token %}
{% bootstrap_form form %}
{% if REDIRECT_FIELD_VALUE %}
- <input type="hidden" name="{{ REDIRECT_FIELD_NAME }}"
- value="{{ REDIRECT_FIELD_VALUE }}"/>
+ <input type="hidden" name="{{ REDIRECT_FIELD_NAME }}"
+ value="{{ REDIRECT_FIELD_VALUE }}"/>
{% endif %}
</fieldset>
<button type="submit" class="btn primary narrow">
diff --git a/templates/base.html b/templates/base.html
index 5303546e6b..1e9a9dd718 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -119,7 +119,7 @@
<div class="navbar__brand__cart float-right">
<a rel="nofollow" class="cart__icon" href="{% url "cart:index" %}">
<span class="cart-label d-none d-md-inline-block">
- {% trans "Your Cart" context "Main navigation item" %}
+ {% trans "Your Cart" context "Main navigation item" %}
</span>
<div class="navbar__brand__cart__icon">
<svg data-src="{% static "images/cart.svg" %}" width="35" height="30"/>
diff --git a/templates/cart/index.html b/templates/cart/index.html
index 8fa89684fa..aa946c8bd0 100644
--- a/templates/cart/index.html
+++ b/templates/cart/index.html
@@ -7,10 +7,10 @@
{% block title %}{% trans "Your cart" context "Cart page title" %} — {{ block.super }}{% endblock %}
{% block breadcrumb %}
-<ul class="breadcrumbs list-unstyled">
- <li><a href="{% url 'home' %}">{% trans "Home" context "Main navigation item" %}</a></li>
- <li><a rel="nofollow" href="{% url 'cart:index' %}">{% trans "Cart" context "Cart breadcrumb" %}</a></li>
-</ul>
+ <ul class="breadcrumbs list-unstyled">
+ <li><a href="{% url 'home' %}">{% trans "Home" context "Main navigation item" %}</a></li>
+ <li><a rel="nofollow" href="{% url 'cart:index' %}">{% trans "Cart" context "Cart breadcrumb" %}</a></li>
+ </ul>
{% endblock breadcrumb %}
{% block meta_tags %}
@@ -18,76 +18,76 @@
{% endblock meta_tags %}
{% block content %}
-<div class="alert alert-success remove-product-alert d-none">
- {% trans "Product has been removed from cart" context "Cart message" %}
- <button type="button" class="close close-msg" aria-hidden="true">&times;</button>
-</div>
-<div class="cart">
- {% if cart_lines %}
- <div class="table__header d-none d-md-block">
- <div class="row">
- <div class="col-md-7">
- <small>{% trans "Product" context "Cart table header" %}</small>
- </div>
- <div class="col-md-3">
- <small>{% trans "Quantity" context "Cart table header" %}</small>
- </div>
- <div class="col-md-2 text-right">
- <small>{% trans "Price" context "Cart table header" %}</small>
- </div>
- </div>
- </div>
- {% for line in cart_lines %}
- <div class="cart__line{% if forloop.last %} last{% endif %} table__row">
+ <div class="alert alert-success remove-product-alert d-none">
+ {% trans "Product has been removed from cart" context "Cart message" %}
+ <button type="button" class="close close-msg" aria-hidden="true">&times;</button>
+ </div>
+ <div class="cart">
+ {% if cart_lines %}
+ <div class="table__header d-none d-md-block">
<div class="row">
- <div class="col-7 cart__line__product">
- <a class="link--clean" href="{{ line.variant.get_absolute_url }}">
- <img src="{% get_thumbnail line.variant.product.images.first.image method="crop" size="60x60" %}"
- srcset="{% get_thumbnail line.variant.product.images.first.image method="crop" size="60x60" %} 1x, {% get_thumbnail line.variant.product.images.first.image method="crop" size="120x120" %} 2x"
- alt="">
- <p>{{ line.variant.product }}
- <br><small>{{ line.variant }}</small></p>
- </a>
+ <div class="col-md-7">
+ <small>{% trans "Product" context "Cart table header" %}</small>
</div>
- <div class="col-5">
- <div class="row">
- <div class="cart__line__quantity col-md-7 col-12">
- <form role="form" action="{% url "cart:update-line" variant_id=line.variant.pk %}" method="post" class="form-cart">
- <div class="{% if form.quantity.errors %} has-error{% endif %}" tabindex="-1">
- {{ line.form.quantity }}
- </div>
- {% csrf_token %}
- </form>
- <span class="cart-item-delete">
- <svg data-src="{% static "images/delete.svg" %}" height="20px" width="20px" />
- </span>
- <small class="cart__line__quantity-error text-danger"></small>
- </div>
- <div class="cart-item-price col-md-5 col-12" data-product-id="{{ line.variant.pk }}">
- <p class="text-right">{% gross line.get_total html=True %}</p>
+ <div class="col-md-3">
+ <small>{% trans "Quantity" context "Cart table header" %}</small>
+ </div>
+ <div class="col-md-2 text-right">
+ <small>{% trans "Price" context "Cart table header" %}</small>
+ </div>
+ </div>
+ </div>
+ {% for line in cart_lines %}
+ <div class="cart__line{% if forloop.last %} last{% endif %} table__row">
+ <div class="row">
+ <div class="col-7 cart__line__product">
+ <a class="link--clean" href="{{ line.variant.get_absolute_url }}">
+ <img src="{% get_thumbnail line.variant.product.images.first.image method="crop" size="60x60" %}"
+ srcset="{% get_thumbnail line.variant.product.images.first.image method="crop" size="60x60" %} 1x, {% get_thumbnail line.variant.product.images.first.image method="crop" size="120x120" %} 2x"
+ alt="">
+ <p>{{ line.variant.product }}
+ <br><small>{{ line.variant }}</small></p>
+ </a>
+ </div>
+ <div class="col-5">
+ <div class="row">
+ <div class="cart__line__quantity col-md-7 col-12">
+ <form role="form" action="{% url "cart:update-line" variant_id=line.variant.pk %}" method="post" class="form-cart">
+ <div class="{% if form.quantity.errors %} has-error{% endif %}" tabindex="-1">
+ {{ line.form.quantity }}
+ </div>
+ {% csrf_token %}
+ </form>
+ <span class="cart-item-delete">
+ <svg data-src="{% static "images/delete.svg" %}" height="20px" width="20px" />
+ </span>
+ <small class="cart__line__quantity-error text-danger"></small>
+ </div>
+ <div class="cart-item-price col-md-5 col-12" data-product-id="{{ line.variant.pk }}">
+ <p class="text-right">{% gross line.get_total html=True %}</p>
+ </div>
</div>
</div>
</div>
</div>
+ {% endfor %}
+ <div class="cart__subtotal">
+ {% include 'cart/_subtotal_table.html' %}
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <a href="{% url "checkout:login" %}" class="btn primary float-right cart__submit">
+ {% trans "Checkout" context "Cart primary action" %}
+ </a>
+ </div>
</div>
- {% endfor %}
- <div class="cart__subtotal">
- {% include 'cart/_subtotal_table.html' %}
- </div>
- <div class="row">
- <div class="col-md-12">
- <a href="{% url "checkout:login" %}" class="btn primary float-right cart__submit">
- {% trans "Checkout" context "Cart primary action" %}
- </a>
+ {% else %}
+ <div class="cart__empty">
+ <img src="{% static 'images/empty-cart-bg.png' %}"
+ srcset="{% static 'images/empty-cart-bg.png' %} 1x, {% static 'images/empty-cart-bg2x.png' %} 2x">
+ <h2>{% trans "There are no products in your shopping cart." context "Empty cart message" %}</h2>
+ <a href="{% url 'home' %}" class="btn primary">{% trans "Check out our sales" context "Empty cart link" %}</a>
</div>
- </div>
- {% else %}
- <div class="cart__empty">
- <img src="{% static 'images/empty-cart-bg.png' %}"
- srcset="{% static 'images/empty-cart-bg.png' %} 1x, {% static 'images/empty-cart-bg2x.png' %} 2x">
- <h2>{% trans "There are no products in your shopping cart." context "Empty cart message" %}</h2>
- <a href="{% url 'home' %}" class="btn primary">{% trans "Check out our sales" context "Empty cart link" %}</a>
- </div>
- {% endif %}
-</div>
+ {% endif %}
+ </div>
{% endblock content %}
diff --git a/templates/category/_items.html b/templates/category/_items.html
index 4321284a42..549d6ac251 100644
--- a/templates/category/_items.html
+++ b/templates/category/_items.html
@@ -19,7 +19,7 @@
<div class="panel-footer">
{% if availability.available %}
{% price_range availability.price_range %}
- {% if availability.discount %}
+ {% if availability.discount %}
{% if availability.price_range_undiscounted.min_price != availability.price_range.min_price %}
<div class="product-list__sale">
<svg data-src="{% static "images/sale-bg.svg" %}" />
diff --git a/templates/category/_list.html b/templates/category/_list.html
index d904a2e431..ef44009c32 100644
--- a/templates/category/_list.html
+++ b/templates/category/_list.html
@@ -1,12 +1,12 @@
{% load mptt_tags %}
{% recursetree categories %}
- <li>
- <a href="{{ node.get_absolute_url }}">{{ node }}</a>
- {% if not node.is_leaf_node %}
- <ul class="children">
- {{ children }}
- </ul>
- {% endif %}
- </li>
+ <li>
+ <a href="{{ node.get_absolute_url }}">{{ node }}</a>
+ {% if not node.is_leaf_node %}
+ <ul class="children">
+ {{ children }}
+ </ul>
+ {% endif %}
+ </li>
{% endrecursetree %}
diff --git a/templates/category/index.html b/templates/category/index.html
index 140d9ca381..b0c9e3f117 100644
--- a/templates/category/index.html
+++ b/templates/category/index.html
@@ -13,21 +13,21 @@
{% block title %}{{ category }} — {{ block.super }}{% endblock %}
{% block meta_tags %}
- <meta property="og:title" content="{{ category }}">
- <meta property="og:description" content="{{ category.description }}">
- <meta property="og:image" content="{% static "images/block1.png" %}">
+ <meta property="og:title" content="{{ category }}">
+ <meta property="og:description" content="{{ category.description }}">
+ <meta property="og:image" content="{% static "images/block1.png" %}">
- {% build_absolute_uri request=request location=category.get_absolute_url as category_url %}
- <meta property="og:url" content="{{ category_url }}">
- <link rel="canonical" href="{{ category_url }}?page={{ products_paginated.number }}">
+ {% build_absolute_uri request=request location=category.get_absolute_url as category_url %}
+ <meta property="og:url" content="{{ category_url }}">
+ <link rel="canonical" href="{{ category_url }}?page={{ products_paginated.number }}">
- {% if products_paginated.has_previous %}
- <link rel="prev" href="{{ category_url }}?page={{ products_paginated.previous_page_number }}">
- {% endif %}
+ {% if products_paginated.has_previous %}
+ <link rel="prev" href="{{ category_url }}?page={{ products_paginated.previous_page_number }}">
+ {% endif %}
- {% if products_paginated.has_next %}
- <link rel="next" href="{{ category_url }}?page={{ products_paginated.next_page_number }}">
- {% endif %}
+ {% if products_paginated.has_next %}
+ <link rel="next" href="{{ category_url }}?page={{ products_paginated.next_page_number }}">
+ {% endif %}
{% endblock meta_tags %}
{% block breadcrumb %}
diff --git a/templates/checkout/details.html b/templates/checkout/details.html
index a25cddd272..8756cfb8eb 100644
--- a/templates/checkout/details.html
+++ b/templates/checkout/details.html
@@ -7,72 +7,72 @@
{% block title %}{% trans "Checkout" context "Checkout page title" %} — {{ block.super }}{% endblock %}
{% block header %}
- <div class="container navbar__login">
- <p>{% trans "Easy and secure!" context "Checkout top message" %}</p>
+ <div class="container navbar__login">
+ <p>{% trans "Easy and secure!" context "Checkout top message" %}</p>
+ </div>
+ <header class="checkout__header">
+ <div class="container">
+ <a href="{% url 'home'%}">
+ <svg data-src="{% static "images/logo.svg" %}" height="38px" width="176px" />
+ </a>
+ <h1>{% trans "Checkout" context "Checkout title" %}</h1>
</div>
- <header class="checkout__header">
- <div class="container">
- <a href="{% url 'home'%}">
- <svg data-src="{% static "images/logo.svg" %}" height="38px" width="176px" />
- </a>
- <h1>{% trans "Checkout" context "Checkout title" %}</h1>
- </div>
- </header>
+ </header>
{% endblock %}
{% block footer %}
{% endblock %}
{% block content %}
- <div class="row checkout">
- <div class="col-md-7">
- {% block forms %}{% endblock %}
- </div>
- <div class="col-md-5">
- {% with total=checkout.get_total %}
- <div class="checkout__review">
- <h3 class="checkout__review__tittle">{% trans "Order review" context "Order review title" %}</h3>
- {% for shipment, shipment_cost, total_with_shipment in checkout.deliveries %}
- {% for item, item_price_per_item, item_price_total in shipment %}
- <div class="row">
- <div class="col-8">
- <p><strong>{{ item.variant.product }}</strong> x {{ item.quantity }}<br>
- <span class="checkout__review__variant">{{ item.variant }}</span></p>
- </div>
- <div class="col-4">
- <p class="float-right">{% net item_price_total %}</p>
- </div>
+ <div class="row checkout">
+ <div class="col-md-7">
+ {% block forms %}{% endblock %}
+ </div>
+ <div class="col-md-5">
+ {% with total=checkout.get_total %}
+ <div class="checkout__review">
+ <h3 class="checkout__review__tittle">{% trans "Order review" context "Order review title" %}</h3>
+ {% for shipment, shipment_cost, total_with_shipment in checkout.deliveries %}
+ {% for item, item_price_per_item, item_price_total in shipment %}
+ <div class="row">
+ <div class="col-8">
+ <p><strong>{{ item.variant.product }}</strong> x {{ item.quantity }}<br>
+ <span class="checkout__review__variant">{{ item.variant }}</span></p>
+ </div>
+ <div class="col-4">
+ <p class="float-right">{% net item_price_total %}</p>
</div>
- {% endfor %}
- {% endfor %}
- <div class="row checkout__review__section">
- <div class="col-8">
- <p>{% trans "Shipment" context "Order review section" %}</p>
- </div>
- <div class="col-4">
- <p class="float-right">{% if checkout.shipping_method %}
- {% net checkout.shipping_method.get_total %}
- {% else %}
- &mdash;
- {% endif %}</p>
</div>
+ {% endfor %}
+ {% endfor %}
+ <div class="row checkout__review__section">
+ <div class="col-8">
+ <p>{% trans "Shipment" context "Order review section" %}</p>
</div>
- <div class="row checkout__review__section">
- <div class="col-12">
- <h3>{% trans "Promo code" context "Order review section title" %}</h3>
- {% include "checkout/snippets/voucher_form.html" with discount=checkout.discount form=voucher_form %}
- </div>
+ <div class="col-4">
+ <p class="float-right">{% if checkout.shipping_method %}
+ {% net checkout.shipping_method.get_total %}
+ {% else %}
+ &mdash;
+ {% endif %}</p>
</div>
- <div class="row checkout__review__section">
- <div class="col-8">
- <h3>{% trans "Total" context "Order review section title" %}</h3>
- </div>
- <div class="col-4">
- <h3 class="float-right">{% gross total html=True %}</h3>
- </div>
+ </div>
+ <div class="row checkout__review__section">
+ <div class="col-12">
+ <h3>{% trans "Promo code" context "Order review section title" %}</h3>
+ {% include "checkout/snippets/voucher_form.html" with discount=checkout.discount form=voucher_form %}
</div>
</div>
- {% endwith %}
- </div>
+ <div class="row checkout__review__section">
+ <div class="col-8">
+ <h3>{% trans "Total" context "Order review section title" %}</h3>
+ </div>
+ <div class="col-4">
+ <h3 class="float-right">{% gross total html=True %}</h3>
+ </div>
+ </div>
+ </div>
+ {% endwith %}
+ </div>
</div>
{% endblock content %}
diff --git a/templates/checkout/payment.html b/templates/checkout/payment.html
index 6b322cf744..0d0f04bc6f 100644
--- a/templates/checkout/payment.html
+++ b/templates/checkout/payment.html
@@ -4,13 +4,13 @@
{% block forms %}
- <form method="post" novalidate>
- {% csrf_token %}
- <h1>{% trans "Payment" context "Checkout payment title" %}</h1>
- {% bootstrap_form payment_form %}
- {% bootstrap_form billing_address_form %}
- <button type="submit" class="btn primary">
- {% trans "Place order" context "Checkout payment primary action" %}
- </button>
- </form>
+ <form method="post" novalidate>
+ {% csrf_token %}
+ <h1>{% trans "Payment" context "Checkout payment title" %}</h1>
+ {% bootstrap_form payment_form %}
+ {% bootstrap_form billing_address_form %}
+ <button type="submit" class="btn primary">
+ {% trans "Place order" context "Checkout payment primary action" %}
+ </button>
+ </form>
{% endblock forms %}
diff --git a/templates/checkout/shipping_address.html b/templates/checkout/shipping_address.html
index 3658fb3689..b8a09ef402 100644
--- a/templates/checkout/shipping_address.html
+++ b/templates/checkout/shipping_address.html
@@ -3,20 +3,20 @@
{% load bootstrap_form from bootstrap4 %}
{% block forms %}
- <form method="post" novalidate class="checkout__shipping">
- {% csrf_token %}
- <h2>{% trans "Shipping address" context "Checkout shipping address title" %}</h2>
- {% if request.user.is_authenticated %}
- {% include "checkout/snippets/addresses_form.html" with addresses_form=user_form addresses=additional_addresses address_form=address_form only %}
- {% else %}
- {% bootstrap_form user_form %}
- {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}
- {% endif %}
+ <form method="post" novalidate class="checkout__shipping">
+ {% csrf_token %}
+ <h2>{% trans "Shipping address" context "Checkout shipping address title" %}</h2>
+ {% if request.user.is_authenticated %}
+ {% include "checkout/snippets/addresses_form.html" with addresses_form=user_form addresses=additional_addresses address_form=address_form only %}
+ {% else %}
+ {% bootstrap_form user_form %}
+ {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}
+ {% endif %}
- <p class="text-md-right">
- <button type="submit" class="btn primary">
- {% trans "Continue" context "Checkout shipping address primary action" %}
- </button>
- </p>
- </form>
+ <p class="text-md-right">
+ <button type="submit" class="btn primary">
+ {% trans "Continue" context "Checkout shipping address primary action" %}
+ </button>
+ </p>
+ </form>
{% endblock %}
diff --git a/templates/checkout/shipping_method.html b/templates/checkout/shipping_method.html
index dad53853c4..ed5fe492b3 100644
--- a/templates/checkout/shipping_method.html
+++ b/templates/checkout/shipping_method.html
@@ -5,18 +5,18 @@
{% load bootstrap_form from bootstrap4 %}
{% block forms %}
- <h3>{% trans "Shipping address" context "Checkout shipping address title" %}</h3>
- {% format_address checkout.shipping_address %}
- <p><a href="{% url 'checkout:shipping-address' %}">{% trans "Select other address" %}</a></p>
- <hr>
- <form method="post" novalidate>
- {% csrf_token %}
- <h2>{% trans "Shipping method" context "Checkout shipping method form title" %}</h2>
- {% bootstrap_form shipping_method_form show_label=False %}
- <p class="text-md-right">
- <button type="submit" class="btn primary">
- {% trans "Continue" context "Checkout shipping method primary action" %}
- </button>
- </p>
- </form>
+ <h3>{% trans "Shipping address" context "Checkout shipping address title" %}</h3>
+ {% format_address checkout.shipping_address %}
+ <p><a href="{% url 'checkout:shipping-address' %}">{% trans "Select other address" %}</a></p>
+ <hr>
+ <form method="post" novalidate>
+ {% csrf_token %}
+ <h2>{% trans "Shipping method" context "Checkout shipping method form title" %}</h2>
+ {% bootstrap_form shipping_method_form show_label=False %}
+ <p class="text-md-right">
+ <button type="submit" class="btn primary">
+ {% trans "Continue" context "Checkout shipping method primary action" %}
+ </button>
+ </p>
+ </form>
{% endblock %}
diff --git a/templates/checkout/snippets/addresses_form.html b/templates/checkout/snippets/addresses_form.html
index d31f820ba2..5050e339c0 100644
--- a/templates/checkout/snippets/addresses_form.html
+++ b/templates/checkout/snippets/addresses_form.html
@@ -1,14 +1,14 @@
{% load i18n %}
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
- {% if addresses_form.SHIPPING_ADDRESS %}
- {% trans "Same as shipping" context "Checkout addresses form label" as same_as_shipping %}
- {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" radio_name=addresses_form.address.html_name radio_value=addresses_form.SHIPPING_ADDRESS label=same_as_shipping value=addresses_form.address.value only %}
- {% endif %}
- {% for address in addresses %}
- {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" radio_name=addresses_form.address.html_name radio_value=address.id label=address value=addresses_form.address.value address=address only %}
- {% endfor %}
- {% if addresses_form.NEW_ADDRESS and address_form %}
- {% trans "Enter a new address" context "Checkout addresses form label" as enter_a_new_address %}
- {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" radio_name=addresses_form.address.html_name radio_value=addresses_form.NEW_ADDRESS label=enter_a_new_address value=addresses_form.address.value address_form=address_form only %}
- {% endif %}
+ {% if addresses_form.SHIPPING_ADDRESS %}
+ {% trans "Same as shipping" context "Checkout addresses form label" as same_as_shipping %}
+ {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" radio_name=addresses_form.address.html_name radio_value=addresses_form.SHIPPING_ADDRESS label=same_as_shipping value=addresses_form.address.value only %}
+ {% endif %}
+ {% for address in addresses %}
+ {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" radio_name=addresses_form.address.html_name radio_value=address.id label=address value=addresses_form.address.value address=address only %}
+ {% endfor %}
+ {% if addresses_form.NEW_ADDRESS and address_form %}
+ {% trans "Enter a new address" context "Checkout addresses form label" as enter_a_new_address %}
+ {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" radio_name=addresses_form.address.html_name radio_value=addresses_form.NEW_ADDRESS label=enter_a_new_address value=addresses_form.address.value address_form=address_form only %}
+ {% endif %}
</div>
diff --git a/templates/checkout/snippets/addresses_form_panel.html b/templates/checkout/snippets/addresses_form_panel.html
index ff910dc5f4..1698b9c9c2 100644
--- a/templates/checkout/snippets/addresses_form_panel.html
+++ b/templates/checkout/snippets/addresses_form_panel.html
@@ -18,7 +18,7 @@
<div>
{% if address_form %}
<div class="checkout__new-address">
- {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}
+ {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}
</div>
{% endif %}
</div>
diff --git a/templates/checkout/snippets/voucher_form.html b/templates/checkout/snippets/voucher_form.html
index 4de4464f33..fa7e903ef6 100644
--- a/templates/checkout/snippets/voucher_form.html
+++ b/templates/checkout/snippets/voucher_form.html
@@ -15,7 +15,6 @@
aria-label="{% trans "Remove" context "Checkout voucher form action" %}">
{% trans "(Remove)" context "Checkout voucher form action" %}
</button>
-
</form>
<div class="float-right">
{% discount_as_negative discount %}
diff --git a/templates/checkout/summary_without_shipping.html b/templates/checkout/summary_without_shipping.html
index 36f7179e80..4336f34b6d 100644
--- a/templates/checkout/summary_without_shipping.html
+++ b/templates/checkout/summary_without_shipping.html
@@ -3,21 +3,21 @@
{% load bootstrap_form from bootstrap4 %}
{% block forms %}
- <form method="post" novalidate>
- {% csrf_token %}
- <h2>{% trans "Billing address" context "Checkout summary without shipping title" %}</h2>
- {% if request.user.is_authenticated %}
- {% include "checkout/snippets/addresses_form.html" with addresses_form=addresses_form addresses=additional_addresses address_form=address_form only %}
- {% else %}
- {% bootstrap_form user_form %}
- {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}
- {% endif %}
- <h2>{% trans "Add a note to your order" context "Checkout summary without shipping note title" %}</h2>
- {% bootstrap_form note_form show_label=False %}
- <p class="text-md-right">
- <button type="submit" class="btn primary">
- {% trans "Place order" context "Checkout summary without shipping action" %}
- </button>
- </p>
- </form>
-{% endblock forms %}
+ <form method="post" novalidate>
+ {% csrf_token %}
+ <h2>{% trans "Billing address" context "Checkout summary without shipping title" %}</h2>
+ {% if request.user.is_authenticated %}
+ {% include "checkout/snippets/addresses_form.html" with addresses_form=addresses_form addresses=additional_addresses address_form=address_form only %}
+ {% else %}
+ {% bootstrap_form user_form %}
+ {% include "userprofile/snippets/address_form.html" with address_form=address_form only %}
+ {% endif %}
+ <h2>{% trans "Add a note to your order" context "Checkout summary without shipping note title" %}</h2>
+ {% bootstrap_form note_form show_label=False %}
+ <p class="text-md-right">
+ <button type="submit" class="btn primary">
+ {% trans "Place order" context "Checkout summary without shipping action" %}
+ </button>
+ </p>
+ </form>
+{% endblock forms %}
\ No newline at end of file
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 3537003c78..7b62b5fa3d 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -101,25 +101,25 @@
</p>
<ul>
{% if perms.product.view_product %}
- <li class="{% block menu_products_class %}{% endblock %}">
- <a href="{% url 'dashboard:product-list' %}">
- {% trans "Products" context "Dashboard products list" %}
- </a>
- </li>
+ <li class="{% block menu_products_class %}{% endblock %}">
+ <a href="{% url 'dashboard:product-list' %}">
+ {% trans "Products" context "Dashboard products list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.product.view_category %}
- <li class="{% block menu_categories_class %}{% endblock %}">
- <a href="{% url 'dashboard:category-list' %}">
- {% trans "Categories" context "Dashboard categories list" %}
- </a>
- </li>
+ <li class="{% block menu_categories_class %}{% endblock %}">
+ <a href="{% url 'dashboard:category-list' %}">
+ {% trans "Categories" context "Dashboard categories list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.product.view_stock_location %}
- <li class="{% block menu_location_class %}{% endblock %}">
- <a href="{% url 'dashboard:product-stock-location-list' %}">
- {% trans "Stock locations" context "Dashboard stock loactions list" %}
- </a>
- </li>
+ <li class="{% block menu_location_class %}{% endblock %}">
+ <a href="{% url 'dashboard:product-stock-location-list' %}">
+ {% trans "Stock locations" context "Dashboard stock loactions list" %}
+ </a>
+ </li>
{% endif %}
</ul>
</li>
@@ -131,18 +131,18 @@
</p>
<ul>
{% if perms.discount.view_sale %}
- <li class="{% block menu_sales_class %}{% endblock %}">
- <a href="{% url 'dashboard:sale-list' %}">
- {% trans "Sales" context "Dashboard sales (discounts) list" %}
- </a>
- </li>
+ <li class="{% block menu_sales_class %}{% endblock %}">
+ <a href="{% url 'dashboard:sale-list' %}">
+ {% trans "Sales" context "Dashboard sales (discounts) list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.discount.view_voucher %}
- <li class="{% block menu_vouchers_class %}{% endblock %}">
- <a href="{% url 'dashboard:voucher-list' %}">
- {% trans "Vouchers" context "Dashboard vouchers list" %}
- </a>
- </li>
+ <li class="{% block menu_vouchers_class %}{% endblock %}">
+ <a href="{% url 'dashboard:voucher-list' %}">
+ {% trans "Vouchers" context "Dashboard vouchers list" %}
+ </a>
+ </li>
{% endif %}
</ul>
</li>
@@ -154,18 +154,18 @@
</p>
<ul>
{% if perms.order.view_order %}
- <li class="{% block menu_orders_class %}{% endblock %}">
- <a href="{% url 'dashboard:orders' %}">
- {% trans "Orders" context "Dashboard orders list" %}
- </a>
- </li>
+ <li class="{% block menu_orders_class %}{% endblock %}">
+ <a href="{% url 'dashboard:orders' %}">
+ {% trans "Orders" context "Dashboard orders list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.userprofile.view_user %}
- <li class="{% block menu_customers_class %}{% endblock %}">
- <a href="{% url 'dashboard:customers' %}">
- {% trans "Customers" context "Dashboard customers list" %}
- </a>
- </li>
+ <li class="{% block menu_customers_class %}{% endblock %}">
+ <a href="{% url 'dashboard:customers' %}">
+ {% trans "Customers" context "Dashboard customers list" %}
+ </a>
+ </li>
{% endif %}
</ul>
</li>
@@ -177,18 +177,18 @@
</p>
<ul>
{% if perms.userprofile.view_staff %}
- <li class="{% block menu_staff_class %}{% endblock %}">
- <a href="{% url 'dashboard:staff-list' %}">
- {% trans "Staff members" context "Dashboard staff members list" %}
- </a>
- </li>
+ <li class="{% block menu_staff_class %}{% endblock %}">
+ <a href="{% url 'dashboard:staff-list' %}">
+ {% trans "Staff members" context "Dashboard staff members list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.userprofile.view_group %}
- <li class="{% block menu_groups_class %}{% endblock %}">
- <a href="{% url 'dashboard:group-list' %}">
- {% trans "Groups" context "Dashboard groups list" %}
- </a>
- </li>
+ <li class="{% block menu_groups_class %}{% endblock %}">
+ <a href="{% url 'dashboard:group-list' %}">
+ {% trans "Groups" context "Dashboard groups list" %}
+ </a>
+ </li>
{% endif %}
</ul>
</li>
@@ -200,32 +200,32 @@
</p>
<ul>
{% if perms.product.view_properties %}
- <li class="{% block menu_product_classes_class %}{% endblock %}">
- <a href="{% url 'dashboard:product-class-list' %}">
- {% trans "Product types" context "Dashboard product types list" %}
- </a>
- </li>
+ <li class="{% block menu_product_classes_class %}{% endblock %}">
+ <a href="{% url 'dashboard:product-class-list' %}">
+ {% trans "Product types" context "Dashboard product types list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.product.view_properties %}
- <li class="{% block menu_attributes_class %}{% endblock %}">
- <a href="{% url 'dashboard:product-attributes' %}">
- {% trans "Attributes" context "Dashboard attributes list" %}
- </a>
- </li>
+ <li class="{% block menu_attributes_class %}{% endblock %}">
+ <a href="{% url 'dashboard:product-attributes' %}">
+ {% trans "Attributes" context "Dashboard attributes list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.shipping.view_shipping %}
- <li class="{% block menu_delivery_class %}{% endblock %}">
- <a href="{% url 'dashboard:shipping-methods' %}">
- {% trans "Shipping methods" context "Dashboard shipping methods list" %}
- </a>
- </li>
+ <li class="{% block menu_delivery_class %}{% endblock %}">
+ <a href="{% url 'dashboard:shipping-methods' %}">
+ {% trans "Shipping methods" context "Dashboard shipping methods list" %}
+ </a>
+ </li>
{% endif %}
{% if perms.site.edit_settings %}
- <li class="{% block menu_settings_class %}{% endblock %}">
- <a href="{% url 'dashboard:site-index' %}">
- {% trans "Site settings" context "Dashboard site settings" %}
- </a>
- </li>
+ <li class="{% block menu_settings_class %}{% endblock %}">
+ <a href="{% url 'dashboard:site-index' %}">
+ {% trans "Site settings" context "Dashboard site settings" %}
+ </a>
+ </li>
{% endif %}
</ul>
</li>
diff --git a/templates/dashboard/base_modal_confirm_delete.html b/templates/dashboard/base_modal_confirm_delete.html
index cff891b99b..f2498fa1d9 100644
--- a/templates/dashboard/base_modal_confirm_delete.html
+++ b/templates/dashboard/base_modal_confirm_delete.html
@@ -6,24 +6,24 @@
<div class="row">
<div class="col s12">
<h5>
- {% block title %}
+ {% block title %}
{% trans "Remove" context "Dashboard confirmation modal" %}
- {% endblock %}
+ {% endblock %}
</h5>
</div>
</div>
{% block content %}
- {% trans "Are you sure?" context "Dashboard confirmation modal" %}
+ {% trans "Are you sure?" context "Dashboard confirmation modal" %}
{% endblock %}
</div>
<div class="modal-footer">
- {% block footer %}
- <a href="#!" class="modal-action modal-close btn-flat waves-effect">
- {% trans "Cancel" context "Dashboard cancel action" %}
- </a>
- <button type="submit" class="modal-action btn-flat waves-effect">
- {% trans "Remove" context "Dashboard delete action" %}
- </button>
- {% endblock footer %}
+ {% block footer %}
+ <a href="#!" class="modal-action modal-close btn-flat waves-effect">
+ {% trans "Cancel" context "Dashboard cancel action" %}
+ </a>
+ <button type="submit" class="modal-action btn-flat waves-effect">
+ {% trans "Remove" context "Dashboard delete action" %}
+ </button>
+ {% endblock footer %}
</div>
</form>
diff --git a/templates/dashboard/customer/form.html b/templates/dashboard/customer/form.html
index 7eb4b9c16c..ba799b6e1f 100644
--- a/templates/dashboard/customer/form.html
+++ b/templates/dashboard/customer/form.html
@@ -47,10 +47,10 @@
{% trans 'Customer details' context 'Customer details header' %}
</span>
<div class="data">
- {% csrf_token %}
- <div class="row">
- {{ form|materializecss }}
- </div>
+ {% csrf_token %}
+ <div class="row">
+ {{ form|materializecss }}
+ </div>
</div>
</div>
{% if perms.userprofile.edit_user %}
diff --git a/templates/dashboard/discount/sale/list.html b/templates/dashboard/discount/sale/list.html
index 57c5ae0ddb..c0f8deb751 100644
--- a/templates/dashboard/discount/sale/list.html
+++ b/templates/dashboard/discount/sale/list.html
@@ -24,13 +24,13 @@
{% block header_extra %}
{% if perms.discount.edit_sale %}
- <div class="btn-fab-fixed">
- <a href="{% url 'dashboard:sale-add' %}" class="btn-fab-default waves-effect waves-light"
- title="{% trans "Add sale" context "Sale (discount) list add button text" %}">
- <svg data-src="{% static "dashboard/images/add.svg" %}" />
- </a>
- </div>
- {% endif %}
+ <div class="btn-fab-fixed">
+ <a href="{% url 'dashboard:sale-add' %}" class="btn-fab-default waves-effect waves-light"
+ title="{% trans "Add sale" context "Sale (discount) list add button text" %}">
+ <svg data-src="{% static "dashboard/images/add.svg" %}" />
+ </a>
+ </div>
+ {% endif %}
{% endblock %}
{% block content %}
diff --git a/templates/dashboard/group/list.html b/templates/dashboard/group/list.html
index 62ed35f39a..3e4feff3c1 100644
--- a/templates/dashboard/group/list.html
+++ b/templates/dashboard/group/list.html
@@ -14,7 +14,6 @@
{% block header_extra %}
{% if perms.userprofile.edit_group %}
-
<div class="btn-fab-fixed">
<a class="btn-fab-default waves-effect waves-light"
title="{% trans "Add group" context "Group list add button text" %}"
@@ -50,18 +49,18 @@
</tr>
</thead>
<tbody>
- {% for group in groups %}
- <tr data-action-go="{% if perms.userprofile.edit_group %}{% url 'dashboard:group-details' pk=group.name.pk %}{% endif %}">
- <td>
- {{ group.name }}
- </td>
- <td class="nowrap">
- {% for permission in group.permissions %}
- {{ permission.name }},
- {% endfor %}
- </td>
- </tr>
- {% endfor %}
+ {% for group in groups %}
+ <tr data-action-go="{% if perms.userprofile.edit_group %}{% url 'dashboard:group-details' pk=group.name.pk %}{% endif %}">
+ <td>
+ {{ group.name }}
+ </td>
+ <td class="nowrap">
+ {% for permission in group.permissions %}
+ {{ permission.name }},
+ {% endfor %}
+ </td>
+ </tr>
+ {% endfor %}
</tbody>
</table>
</div>
diff --git a/templates/dashboard/includes/_filters.html b/templates/dashboard/includes/_filters.html
index 65296d0ded..5647ad9fc6 100644
--- a/templates/dashboard/includes/_filters.html
+++ b/templates/dashboard/includes/_filters.html
@@ -39,11 +39,11 @@
<div class="card-action">
<div class="right-align">
<div class="col s12">
- {% if filter.is_bound_unsorted %}
- <a href="." class="clear-filters btn-flat waves-effect">
- {% trans 'Clear' context 'Category page filters' %}
- </a>
- {% endif %}
+ {% if filter.is_bound_unsorted %}
+ <a href="." class="clear-filters btn-flat waves-effect">
+ {% trans 'Clear' context 'Category page filters' %}
+ </a>
+ {% endif %}
<button class="btn-flat waves-effect" type="submit">
{% trans 'Filter' context 'Category price filter' %}
</button>
diff --git a/templates/dashboard/includes/_pagination.html b/templates/dashboard/includes/_pagination.html
index 8bb4137acf..519cb8ab3b 100644
--- a/templates/dashboard/includes/_pagination.html
+++ b/templates/dashboard/includes/_pagination.html
@@ -5,16 +5,16 @@
{% if page_obj.paginator.num_pages > 1 %}
<ul class="pagination">
- {% if page_obj.has_previous %}
- <li><a href="?page=1"><svg data-src="{% static "dashboard/images/chevron-left.svg" %}" fill="#000" /></a></li>
- {% if page_obj.number|add:previous_section >= 1 %}
- <li><a href="{% construct_get_query page=page_obj.number|add:previous_section %}">&hellip;</a></li>
- {% elif page_obj.number|add:previous_section < 1 and page_obj.number|add:n_backward >= 1 %}
- <li><a href="?page=1">&hellip;</a></li>
- {% endif %}
- {% else %}
- <li class="disabled"><a href="#!"><svg data-src="{% static "dashboard/images/chevron-left.svg" %}" fill="#9E9E9E" /></a></li>
+ {% if page_obj.has_previous %}
+ <li><a href="?page=1"><svg data-src="{% static "dashboard/images/chevron-left.svg" %}" fill="#000" /></a></li>
+ {% if page_obj.number|add:previous_section >= 1 %}
+ <li><a href="{% construct_get_query page=page_obj.number|add:previous_section %}">&hellip;</a></li>
+ {% elif page_obj.number|add:previous_section < 1 and page_obj.number|add:n_backward >= 1 %}
+ <li><a href="?page=1">&hellip;</a></li>
{% endif %}
+ {% else %}
+ <li class="disabled"><a href="#!"><svg data-src="{% static "dashboard/images/chevron-left.svg" %}" fill="#9E9E9E" /></a></li>
+ {% endif %}
{% for page in page_obj.paginator.page_range %}
{% if page_obj.number == page %}
@@ -24,16 +24,15 @@
{% endif %}
{% endfor %}
- {% if page_obj.has_next %}
- {% if page_obj.number|add:next_section <= page_obj.paginator.num_pages %}
- <li><a href="{% construct_get_query page=page_obj.number|add:next_section %}">&hellip;</a></li>
- {% elif page_obj.number|add:next_section > page_obj.paginator.num_pages and page_obj.number|add:n_forward <= page_obj.paginator.num_pages %}
- <li><a href="{% construct_get_query page=page_obj.paginator.num_pages %}">&hellip;</a></li>
- {% endif %}
- <li><a href="{% construct_get_query page=page_obj.paginator.num_pages %}"><svg data-src="{% static "dashboard/images/chevron-right.svg" %}" fill="#000" /></a></li>
- {% else %}
- <li class="disabled"><a href="#!"><svg data-src="{% static "dashboard/images/chevron-right.svg" %}" fill="#9E9E9E" /></a></li>
+ {% if page_obj.has_next %}
+ {% if page_obj.number|add:next_section <= page_obj.paginator.num_pages %}
+ <li><a href="{% construct_get_query page=page_obj.number|add:next_section %}">&hellip;</a></li>
+ {% elif page_obj.number|add:next_section > page_obj.paginator.num_pages and page_obj.number|add:n_forward <= page_obj.paginator.num_pages %}
+ <li><a href="{% construct_get_query page=page_obj.paginator.num_pages %}">&hellip;</a></li>
{% endif %}
- </li>
+ <li><a href="{% construct_get_query page=page_obj.paginator.num_pages %}"><svg data-src="{% static "dashboard/images/chevron-right.svg" %}" fill="#000" /></a></li>
+ {% else %}
+ <li class="disabled"><a href="#!"><svg data-src="{% static "dashboard/images/chevron-right.svg" %}" fill="#9E9E9E" /></a></li>
+ {% endif %}
</ul>
{% endif %}
diff --git a/templates/dashboard/order/modal/capture.html b/templates/dashboard/order/modal/capture.html
index 86a1510231..3695d41427 100644
--- a/templates/dashboard/order/modal/capture.html
+++ b/templates/dashboard/order/modal/capture.html
@@ -14,16 +14,16 @@
{% endblock %}
{% block content %}
-{{ form|materializecss }}
-{% trans "Before this action:" context "Modal capture payment title" %}
-<ul class="list">
- <li class="list-item">{% trans "Order total:" context "Modal capture payment list title" %}
- {% gross payment.order.get_total html=True %}
- </li>
- <li class="list-item">{% trans "Captured amount:" context "Modal capture payment list title" %}
- {{ captured|currencyfmt:currency }}
- </li>
-</ul>
+ {{ form|materializecss }}
+ {% trans "Before this action:" context "Modal capture payment title" %}
+ <ul class="list">
+ <li class="list-item">{% trans "Order total:" context "Modal capture payment list title" %}
+ {% gross payment.order.get_total html=True %}
+ </li>
+ <li class="list-item">{% trans "Captured amount:" context "Modal capture payment list title" %}
+ {{ captured|currencyfmt:currency }}
+ </li>
+ </ul>
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/modal/refund.html b/templates/dashboard/order/modal/refund.html
index 9c0677c724..78c8cf538e 100644
--- a/templates/dashboard/order/modal/refund.html
+++ b/templates/dashboard/order/modal/refund.html
@@ -15,16 +15,16 @@
{% endblock %}
{% block content %}
-{{ form|materializecss }}
-{% trans "Before this action:" context "Modal refund payment title" %}
-<ul class="list">
- <li class="list-item">{% trans "Order total:" context "Modal refund payment list title" %}
- {% gross payment.order.get_total html=True %}
- </li>
- <li class="list-item">{% trans "Captured amount:" context "Modal refund payment list title" %}
- {{ captured|currencyfmt:currency }}
- </li>
-</ul>
+ {{ form|materializecss }}
+ {% trans "Before this action:" context "Modal refund payment title" %}
+ <ul class="list">
+ <li class="list-item">{% trans "Order total:" context "Modal refund payment list title" %}
+ {% gross payment.order.get_total html=True %}
+ </li>
+ <li class="list-item">{% trans "Captured amount:" context "Modal refund payment list title" %}
+ {{ captured|currencyfmt:currency }}
+ </li>
+ </ul>
{% endblock %}
{% block primary_action %}
diff --git a/templates/dashboard/order/pdf/invoice.html b/templates/dashboard/order/pdf/invoice.html
index 59d3803370..726b0dc9fa 100644
--- a/templates/dashboard/order/pdf/invoice.html
+++ b/templates/dashboard/order/pdf/invoice.html
@@ -81,79 +81,79 @@
</tr>
</thead>
<tbody>
- {% for item in order.get_lines.all %}
- <tr>
- <td>
- {{ item.product_name|truncatechars:30 }}<br>
- </td>
- <td>
- {{ item.product_sku }}
- </td>
- <td class="right-align">
- {% gross item.get_price_per_item html=True %}
- </td>
- <td class="right-align">
- {{ item.quantity }}
- </td>
- <td class="right-align">
- {% gross item.get_total html=True %}
- </td>
- </tr>
- {% endfor %}
- {% if order.shipping_price.gross or order.is_shipping_required %}
- {% for shipping in shipping_methods %}
+ {% for item in order.get_lines.all %}
<tr>
<td>
- {% trans "Shipping" context "Shipment order table item column data" %}
+ {{ item.product_name|truncatechars:30 }}<br>
</td>
- <td colspan="3">
- {{ shipping.name }}
+ <td>
+ {{ item.product_sku }}
+ </td>
+ <td class="right-align">
+ {% gross item.get_price_per_item html=True %}
+ </td>
+ <td class="right-align">
+ {{ item.quantity }}
+ </td>
+ <td class="right-align">
+ {% gross item.get_total html=True %}
</td>
</tr>
{% endfor %}
- {% endif %}
+ {% if order.shipping_price.gross or order.is_shipping_required %}
+ {% for shipping in shipping_methods %}
+ <tr>
+ <td>
+ {% trans "Shipping" context "Shipment order table item column data" %}
+ </td>
+ <td colspan="3">
+ {{ shipping.name }}
+ </td>
+ </tr>
+ {% endfor %}
+ {% endif %}
</tbody>
</table>
{% endif %}
<table class="bordered highlight responsive data-table">
<tbody>
- <tr>
- <td class="wide">
- {% trans "Subtotal" context "Order subtotal price" %}
- </td>
- <td class="right-align">
- {% gross order.get_subtotal_without_voucher html=True %}
- </td>
- </tr>
- <tr>
- <td>
- {% trans "Shipping total" context "Order total shipping price header" %}
- </td>
- <td class="right-align">
- {% gross order.shipping_price html=True %}
- </td>
- </tr>
- {% if order.voucher %}
+ <tr>
+ <td class="wide">
+ {% trans "Subtotal" context "Order subtotal price" %}
+ </td>
+ <td class="right-align">
+ {% gross order.get_subtotal_without_voucher html=True %}
+ </td>
+ </tr>
<tr>
<td>
- {% trans "Voucher" context "Order voucher header" %} {{ order.voucher }}
+ {% trans "Shipping total" context "Order total shipping price header" %}
</td>
<td class="right-align">
- {% gross order.discount|discount_amount_for:order.total html=True %}
+ {% gross order.shipping_price html=True %}
</td>
</tr>
- {% endif %}
+ {% if order.voucher %}
+ <tr>
+ <td>
+ {% trans "Voucher" context "Order voucher header" %} {{ order.voucher }}
+ </td>
+ <td class="right-align">
+ {% gross order.discount|discount_amount_for:order.total html=True %}
+ </td>
+ </tr>
+ {% endif %}
</tbody>
<tfoot>
- <tr>
- <td>
- {% trans "Grand total" context "Order total price header" %}
- </td>
- <td class="right-align">
- {% gross order.get_total html=True %}
- </td>
- </tr>
+ <tr>
+ <td>
+ {% trans "Grand total" context "Order total price header" %}
+ </td>
+ <td class="right-align">
+ {% gross order.get_total html=True %}
+ </td>
+ </tr>
</tfoot>
</table>
</body>
diff --git a/templates/dashboard/order/pdf/packing_slip.html b/templates/dashboard/order/pdf/packing_slip.html
index bd796bc381..4074b49e29 100644
--- a/templates/dashboard/order/pdf/packing_slip.html
+++ b/templates/dashboard/order/pdf/packing_slip.html
@@ -61,32 +61,32 @@
{% if group %}
<table class="bordered data-table">
<thead>
- <tr>
- <th class="wide">
- {% trans "Item" context "Shipment group table header" %}
- </th>
- <th>
- {% trans "SKU" context "Shipment group table header" %}
- </th>
- <th class="right-align">
- {% trans "Quantity" context "Shipment group table header" %}
- </th>
- </tr>
- </thead>
- <tbody>
- {% for line in group.lines.all %}
<tr>
- <td>
- {{ line.product_name }}<br>
- </td>
- <td>
- {{ line.product_sku }}
- </td>
- <td class="right-align">
- {{ line.quantity }}
- </td>
+ <th class="wide">
+ {% trans "Item" context "Shipment group table header" %}
+ </th>
+ <th>
+ {% trans "SKU" context "Shipment group table header" %}
+ </th>
+ <th class="right-align">
+ {% trans "Quantity" context "Shipment group table header" %}
+ </th>
</tr>
- {% endfor %}
+ </thead>
+ <tbody>
+ {% for line in group.lines.all %}
+ <tr>
+ <td>
+ {{ line.product_name }}<br>
+ </td>
+ <td>
+ {{ line.product_sku }}
+ </td>
+ <td class="right-align">
+ {{ line.quantity }}
+ </td>
+ </tr>
+ {% endfor %}
</tbody>
</table>
{% endif %}
diff --git a/templates/dashboard/product/detail.html b/templates/dashboard/product/detail.html
index 5ea492bfb9..1af55c539b 100644
--- a/templates/dashboard/product/detail.html
+++ b/templates/dashboard/product/detail.html
@@ -76,7 +76,7 @@
{% trans "Edit product" context "Product action" %}
</a>
<a href="#base-modal" data-href="{% url 'dashboard:product-delete' pk=product.pk %}" class="modal-trigger-custom btn-flat waves-effect">
- {% trans "Remove product" context "Product action" %}
+ {% trans "Remove product" context "Product action" %}
</a>
{% endif %}
<a href="{{ product.get_absolute_url }}" target="_blank" class="btn-flat waves-effect">
@@ -91,7 +91,7 @@
</div>
{% if perms.product.edit_product %}
<div class="data-table-header-action">
- <a href="{% url 'dashboard:variant-add' product_pk=product.pk %}" class="btn-flat waves-effect">{% trans "Add" %}</a>
+ <a href="{% url 'dashboard:variant-add' product_pk=product.pk %}" class="btn-flat waves-effect">{% trans "Add" %}</a>
</div>
{% endif %}
<div class="data-table-container">
diff --git a/templates/dashboard/product/form.html b/templates/dashboard/product/form.html
index 91fa7955e2..2c39bf3e3f 100644
--- a/templates/dashboard/product/form.html
+++ b/templates/dashboard/product/form.html
@@ -35,22 +35,22 @@
</a>
</li>
<li>
- {% if product.pk %}
+ {% if product.pk %}
<a href="{% url "dashboard:product-detail" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
{{ product }}
</a>
- {% else %}
- <span class="breadcrumbs--ellipsed-item">
- {% trans "Add new product" context "Product form breadcrumbs" %}
- </span>
- {% endif %}
+ {% else %}
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Add new product" context "Product form breadcrumbs" %}
+ </span>
+ {% endif %}
</li>
{% if product.pk %}
- <li>
- <span class="breadcrumbs--ellipsed-item">
- {% trans "Edit" context "Product form breadcrumbs" %}
- </span>
- </li>
+ <li>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Edit" context "Product form breadcrumbs" %}
+ </span>
+ </li>
{% endif %}
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/stock_location/modal/confirm_delete.html b/templates/dashboard/product/stock_location/modal/confirm_delete.html
index af775bedca..ddba7583c3 100644
--- a/templates/dashboard/product/stock_location/modal/confirm_delete.html
+++ b/templates/dashboard/product/stock_location/modal/confirm_delete.html
@@ -15,20 +15,20 @@ Remove stock location {{ location }}
{% endblock title %}
{% block content %}
-<p>
-{% blocktrans trimmed context "Modal remove stock location text" %}
- Are you sure you want to remove stock location <strong>{{ location }}</strong>?
-{% endblocktrans %}
-</p>
-{% if stock_count %}
<p>
- {% blocktrans trimmed count counter=stock_count context "Modal remove stock location text" %}
- There is one stock associated with this stock location that will be removed.
- {% plural %}
- There are {{ counter }} stocks associated with this stock location that will be removed.
- {% endblocktrans %}
+ {% blocktrans trimmed context "Modal remove stock location text" %}
+ Are you sure you want to remove stock location <strong>{{ location }}</strong>?
+ {% endblocktrans %}
</p>
-{% endif %}
+ {% if stock_count %}
+ <p>
+ {% blocktrans trimmed count counter=stock_count context "Modal remove stock location text" %}
+ There is one stock associated with this stock location that will be removed.
+ {% plural %}
+ There are {{ counter }} stocks associated with this stock location that will be removed.
+ {% endblocktrans %}
+ </p>
+ {% endif %}
{% endblock content %}
{% block primary_action %}
diff --git a/templates/dashboard/search/results.html b/templates/dashboard/search/results.html
index 7c63c23c2d..23be97d951 100644
--- a/templates/dashboard/search/results.html
+++ b/templates/dashboard/search/results.html
@@ -31,8 +31,8 @@
srcset="{% product_first_image product size="60x60" method="crop" %} 1x, {% product_first_image product size="120x120" method="crop" %} 2x"
class="circle" alt="{{ product.name }}">
<span class="list-item-name">
- {{ product.name }}
- </span>
+ {{ product.name }}
+ </span>
<p class="list-item-price">
<small>
{% gross product.price html=True %}
@@ -51,10 +51,10 @@
<a href="{% url 'dashboard:order-details' order_pk=order.pk %}">
<i class="small material-icons circle">payment</i>
<span class="list-item-name">
- {% blocktrans trimmed with order_number=order.pk context "Dashboard order" %}
- Order #{{ order_number }}
- {% endblocktrans %}
- </span>
+ {% blocktrans trimmed with order_number=order.pk context "Dashboard order" %}
+ Order #{{ order_number }}
+ {% endblocktrans %}
+ </span>
<p class="list-item-price">
<small>
{% blocktrans trimmed context "Dashboard customer" with email=order.user_email %}
@@ -80,10 +80,10 @@
<a href="{% url 'dashboard:customer-details' pk=user.pk %}">
<i class="small material-icons circle">perm_identity</i>
<span class="list-item-name">
- {% blocktrans trimmed with full_name=user.get_full_name context "Dashboard user" %}
- User {{ full_name }}
- {% endblocktrans %}
- </span>
+ {% blocktrans trimmed with full_name=user.get_full_name context "Dashboard user" %}
+ User {{ full_name }}
+ {% endblocktrans %}
+ </span>
<p class="list-item-price">
<small>
{% trans "Customer" context "Dashboard customer" %}
diff --git a/templates/dashboard/sites/authorization_keys/form.html b/templates/dashboard/sites/authorization_keys/form.html
index 2464b27af8..5a1eb784ea 100644
--- a/templates/dashboard/sites/authorization_keys/form.html
+++ b/templates/dashboard/sites/authorization_keys/form.html
@@ -26,7 +26,7 @@
<ul class="breadcrumbs breadcrumbs--history">
<li>
<a href="{% url 'dashboard:site-index' %}" class="breadcrumbs--ellipsed-item">
- {% trans "Site settings" context "Dashboard site setting detail" %}
+ {% trans "Site settings" context "Dashboard site setting detail" %}
</a>
</li>
<li class="back-mobile">
@@ -35,17 +35,17 @@
</a>
</li>
{% if key.pk %}
- <li>
- <span class="breadcrumbs--ellipsed-item">
- {% trans "Edit" context "Authorization key breadcrumbs" %}
- </span>
- </li>
+ <li>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Edit" context "Authorization key breadcrumbs" %}
+ </span>
+ </li>
{% else %}
- <li>
- <span class="breadcrumbs--ellipsed-item">
- {% trans "Add new authorization key" context "Authorization key breadcrumbs" %}
- </span>
- </li>
+ <li>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Add new authorization key" context "Authorization key breadcrumbs" %}
+ </span>
+ </li>
{% endif %}
</ul>
{% endblock %}
diff --git a/templates/dashboard/sites/detail.html b/templates/dashboard/sites/detail.html
index 84c7f8de89..6bbf951950 100644
--- a/templates/dashboard/sites/detail.html
+++ b/templates/dashboard/sites/detail.html
@@ -14,7 +14,7 @@
<ul class="breadcrumbs breadcrumbs--history">
<li>
<span class="breadcrumbs--elipsed-item">
- Site settings
+ Site settings
</span>
</li>
</ul>
@@ -78,9 +78,9 @@
</span>
</div>
<div class="data-table-header-action">
- <a href="{% url 'dashboard:authorization-key-add' site_settings_pk=site.pk %}" class="btn-flat waves-effect">
- {% trans "Add" %}
- </a>
+ <a href="{% url 'dashboard:authorization-key-add' site_settings_pk=site.pk %}" class="btn-flat waves-effect">
+ {% trans "Add" %}
+ </a>
</div>
<div class="data-table-container">
<table class="bordered highlight responsive data-table">
diff --git a/templates/dashboard/staff/modal/confirm_delete.html b/templates/dashboard/staff/modal/confirm_delete.html
index 282a3569b8..53e0f70ee5 100644
--- a/templates/dashboard/staff/modal/confirm_delete.html
+++ b/templates/dashboard/staff/modal/confirm_delete.html
@@ -5,24 +5,24 @@
{% block form_class %}{% endblock %}
{% block action_url %}
-{% url 'dashboard:staff-delete' pk=staff.pk %}
+ {% url 'dashboard:staff-delete' pk=staff.pk %}
{% endblock %}
{% block title %}
-{% blocktrans trimmed context "Modal remove group text" %}
- Remove staff member <strong>{{ staff }}</strong>
-{% endblocktrans %}
+ {% blocktrans trimmed context "Modal remove group text" %}
+ Remove staff member <strong>{{ staff }}</strong>
+ {% endblocktrans %}
{% endblock %}
{% block content %}
-{% blocktrans trimmed context "Modal remove group text" %}
-<p>Are you sure you want to remove staff member?</p>
-<p>Deleting staff member also removes him from customer list and removes all his related data (orders, payment etc.).</p>
-<p>We strongly recommend not deleting user accounts that were used for purchases (for example customer which was promoted with staff member status).</p>
-<p>{{ staff }} has <strong>{{ orders }}</strong> orders.</p>
-{% endblocktrans %}
+ {% blocktrans trimmed context "Modal remove group text" %}
+ <p>Are you sure you want to remove staff member?</p>
+ <p>Deleting staff member also removes him from customer list and removes all his related data (orders, payment etc.).</p>
+ <p>We strongly recommend not deleting user accounts that were used for purchases (for example customer which was promoted with staff member status).</p>
+ <p>{{ staff }} has <strong>{{ orders }}</strong> orders.</p>
+ {% endblocktrans %}
{% endblock content %}
{% block primary_action %}
-{% trans "Remove" context "Dashboard delete action" %}
+ {% trans "Remove" context "Dashboard delete action" %}
{% endblock %}
diff --git a/templates/formatted_address.html b/templates/formatted_address.html
index 3ec52793f3..30d7d060a4 100644
--- a/templates/formatted_address.html
+++ b/templates/formatted_address.html
@@ -1,3 +1,3 @@
<address class="formatted-address{% if inline %} inline-address{% endif %}">
- {% if inline %}{{ address_lines|join:', ' }}{% else %}{{ address_lines|join:'<br>' }}{% endif %}
+ {% if inline %}{{ address_lines|join:', ' }}{% else %}{{ address_lines|join:'<br>' }}{% endif %}
</address>
\ No newline at end of file
diff --git a/templates/home.html b/templates/home.html
index 413743f0c7..024e7ee223 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -2,58 +2,56 @@
{% load i18n %}
{% block content %}
-
- <div class="home">
- <div class="row">
- <div class="col-sm-12 home__block1">
- <div class="home--square">
- <div class="home--content">
- <div class="home--content-wrapper">
- <div class="home--content-inner">
- <h1>{% trans "Promo &amp; Sale" context "Homepage title" %}</h1>
- <h2>{% trans "from the Northpole" context "Homepage title" %}</h2>
- <a class="btn btn-secondary home__button" href="#">
- {% trans "Shop now" context "Homepage action" %}
- </a>
- </div>
+ <div class="home">
+ <div class="row">
+ <div class="col-sm-12 home__block1">
+ <div class="home--square">
+ <div class="home--content">
+ <div class="home--content-wrapper">
+ <div class="home--content-inner">
+ <h1>{% trans "Promo &amp; Sale" context "Homepage title" %}</h1>
+ <h2>{% trans "from the Northpole" context "Homepage title" %}</h2>
+ <a class="btn btn-secondary home__button" href="#">
+ {% trans "Shop now" context "Homepage action" %}
+ </a>
</div>
</div>
</div>
</div>
</div>
- <div class="row">
- <div class="col-sm-12 col-md-6 home__block2">
- <div class="home--square">
- <div class="home--content">
- <div class="home--content-wrapper">
- <div class="home--content-inner">
- <h1>{% trans "Size &amp; Colours" context "Homepage title" %}</h1>
- <a class="btn btn-secondary home__button" href="#">{% trans "Shop now" context "Homepage action" %}</a>
- </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-12 col-md-6 home__block2">
+ <div class="home--square">
+ <div class="home--content">
+ <div class="home--content-wrapper">
+ <div class="home--content-inner">
+ <h1>{% trans "Size &amp; Colours" context "Homepage title" %}</h1>
+ <a class="btn btn-secondary home__button" href="#">{% trans "Shop now" context "Homepage action" %}</a>
</div>
</div>
</div>
</div>
- <div class="col-sm-12 col-md-6 home__block3">
- <div class="home--square">
- <div class="home--content">
- <div class="home--content-wrapper">
- <div class="home--content-inner">
- <h1>{% trans "Digital Downloads" context "Homepage title" %}</h1>
- <a class="btn btn-secondary home__button" href="#">{% trans "Shop now" context "Homepage action" %}</a>
- </div>
+ </div>
+ <div class="col-sm-12 col-md-6 home__block3">
+ <div class="home--square">
+ <div class="home--content">
+ <div class="home--content-wrapper">
+ <div class="home--content-inner">
+ <h1>{% trans "Digital Downloads" context "Homepage title" %}</h1>
+ <a class="btn btn-secondary home__button" href="#">{% trans "Shop now" context "Homepage action" %}</a>
</div>
</div>
</div>
</div>
</div>
- <div class="home__featured">
- <h2 class="text-center">{% trans "Featured products" context "Homepage title" %}</h2>
- <div class="row">
- {% include "category/_items.html" %}
- </div>
+ </div>
+ <div class="home__featured">
+ <h2 class="text-center">{% trans "Featured products" context "Homepage title" %}</h2>
+ <div class="row">
+ {% include "category/_items.html" %}
</div>
</div>
-
<script type="application/ld+json">{{ webpage_schema|safe }}</script>
+ </div>
{% endblock %}
diff --git a/templates/materializecssform/form.html b/templates/materializecssform/form.html
index 3410ce67ba..45908790f0 100644
--- a/templates/materializecssform/form.html
+++ b/templates/materializecssform/form.html
@@ -1,15 +1,15 @@
{% if form.non_field_errors %}
- <blockquote>
- {% for non_field_error in form.non_field_errors %}
- {{ non_field_error }}
- {% endfor %}
- </blockquote>
+ <blockquote>
+ {% for non_field_error in form.non_field_errors %}
+ {{ non_field_error }}
+ {% endfor %}
+ </blockquote>
{% endif %}
{% for field in form.hidden_fields %}
- {{ field }}
+ {{ field }}
{% endfor %}
{% for field in form.visible_fields %}
- {% include "materializecssform/field.html" %}
+ {% include "materializecssform/field.html" %}
{% endfor %}
diff --git a/templates/order/create_password.html b/templates/order/create_password.html
index edb7b0e07f..daa29fcbbf 100644
--- a/templates/order/create_password.html
+++ b/templates/order/create_password.html
@@ -16,10 +16,10 @@
Thank you for your <a href="{{ order_url }}">order</a>!
{% endblocktrans %}</h1>
- <p>{% blocktrans trimmed with order_url=order.get_absolute_url context "Checkout text" %}
- We've sent a confirmation email with details to <span>{{ email }}</span>.<br>
- If any problems or questions contact us.
- {% endblocktrans %}</p>
+ <p>{% blocktrans trimmed with order_url=order.get_absolute_url context "Checkout text" %}
+ We've sent a confirmation email with details to <span>{{ email }}</span>.<br>
+ If any problems or questions contact us.
+ {% endblocktrans %}</p>
<div class="row checkout__thankyoupage__form">
<div class="col-md-6 push-md-6">
{% if login_form is not None %}
diff --git a/templates/order/details.html b/templates/order/details.html
index 625983b1c5..d820673657 100644
--- a/templates/order/details.html
+++ b/templates/order/details.html
@@ -4,57 +4,57 @@
{% load staticfiles %}
{% block title %}
- {% blocktrans trimmed context "Order details page title" %}
- Order {{ order }}
- {% endblocktrans %} — {{ block.super }}
+ {% blocktrans trimmed context "Order details page title" %}
+ Order {{ order }}
+ {% endblocktrans %} — {{ block.super }}
{% endblock %}
{% block breadcrumb %}
- {% if order.user == user %}
- <ul class="breadcrumbs list-unstyled">
- <li><a href="{% url 'home'%}">
- {% trans "Home" context "Main navigation item" %}
- </a></li>
- <li><a href="{% url "profile:details" %}">
- {% trans "Your account" context "Main navigation item" %}
- </a></li>
- <li><a href="{{ order.get_absolute_url }}">
- {% blocktrans trimmed context "Order details breadcrumb" %}
- Order {{ order }}
- {% endblocktrans %}
- </a></li>
- </ul>
- {% endif %}
+ {% if order.user == user %}
+ <ul class="breadcrumbs list-unstyled">
+ <li><a href="{% url 'home'%}">
+ {% trans "Home" context "Main navigation item" %}
+ </a></li>
+ <li><a href="{% url "profile:details" %}">
+ {% trans "Your account" context "Main navigation item" %}
+ </a></li>
+ <li><a href="{{ order.get_absolute_url }}">
+ {% blocktrans trimmed context "Order details breadcrumb" %}
+ Order {{ order }}
+ {% endblocktrans %}
+ </a></li>
+ </ul>
+ {% endif %}
{% endblock breadcrumb %}
{% block meta_tags %}
- <meta name="robots" content="noindex, nofollow">
+ <meta name="robots" content="noindex, nofollow">
{% endblock meta_tags %}
{% block content %}
- {# This view is available by just knowing url, #}
- {# so we don't show all details (like shipping address) #}
- {# unless current user is owner of the order. #}
+ {# This view is available by just knowing url, #}
+ {# so we don't show all details (like shipping address) #}
+ {# unless current user is owner of the order. #}
- <div class="row order-details">
- <div class="col-lg-10 m-auto">
- <h2 class="order-details__header">
- {% blocktrans trimmed with order_status=order.get_status_display context "Order detail text" %}
- Order {{ order }}: {{ order_status }}
- {% endblocktrans %}
- </h2>
- {% if not order.is_fully_paid %}
- {% if order.is_pre_authorized %}
- <a href="{% url "order:payment" token=order.token %}" class="btn btn-link">
- {% trans "Payment details" context "Order details link text" %}
- </a>
- {% else %}
- <a href="{% url "order:payment" token=order.token %}" class="btn primary">
- {% trans "Pay for order" context "Order details primary action" %}
- </a>
- {% endif %}
- {% endif %}
- {% include "order/_ordered_items_table.html" %}
- </div>
+ <div class="row order-details">
+ <div class="col-lg-10 m-auto">
+ <h2 class="order-details__header">
+ {% blocktrans trimmed with order_status=order.get_status_display context "Order detail text" %}
+ Order {{ order }}: {{ order_status }}
+ {% endblocktrans %}
+ </h2>
+ {% if not order.is_fully_paid %}
+ {% if order.is_pre_authorized %}
+ <a href="{% url "order:payment" token=order.token %}" class="btn btn-link">
+ {% trans "Payment details" context "Order details link text" %}
+ </a>
+ {% else %}
+ <a href="{% url "order:payment" token=order.token %}" class="btn primary">
+ {% trans "Pay for order" context "Order details primary action" %}
+ </a>
+ {% endif %}
+ {% endif %}
+ {% include "order/_ordered_items_table.html" %}
</div>
+ </div>
{% endblock content %}
diff --git a/templates/order/payment.html b/templates/order/payment.html
index 5f4646b633..ccae3f2479 100644
--- a/templates/order/payment.html
+++ b/templates/order/payment.html
@@ -7,83 +7,83 @@
{% load staticfiles %}
{% block title %}
- {% blocktrans trimmed context "Payment details page title" %}
- Pay for order {{ order }}
- {% endblocktrans %} — {{ block.super }}
+ {% blocktrans trimmed context "Payment details page title" %}
+ Pay for order {{ order }}
+ {% endblocktrans %} — {{ block.super }}
{% endblock %}
{% block breadcrumb %}
- {% if order.user == user %}
+ {% if order.user == user %}
<ul class="breadcrumbs list-unstyled">
- <li><a href="{% url 'home' %}">
- {% trans "Home" context "Main navigation item" %}
- </a></li>
- <li><a href="{% url "profile:details" %}">
- {% trans "Your account" context "Main navigation item" %}
- </a></li>
- <li><a href="{{ order.get_absolute_url }}">
- {% blocktrans trimmed context "Payment details breadcrumb" %}
- Order {{ order }}
- {% endblocktrans %}
- </a></li>
+ <li><a href="{% url 'home' %}">
+ {% trans "Home" context "Main navigation item" %}
+ </a></li>
+ <li><a href="{% url "profile:details" %}">
+ {% trans "Your account" context "Main navigation item" %}
+ </a></li>
+ <li><a href="{{ order.get_absolute_url }}">
+ {% blocktrans trimmed context "Payment details breadcrumb" %}
+ Order {{ order }}
+ {% endblocktrans %}
+ </a></li>
</ul>
- {% endif %}
+ {% endif %}
{% endblock breadcrumb %}
{% block content %}
- <div class="row checkout">
- <div class="col-lg-10 m-auto">
- {% if order.user == user or not order.is_fully_paid %}
- {% if not order.is_fully_paid %}
- {% if waiting_payment %}
- <h1>
- {% trans "Payment pending" context "Payment details title" %}
- </h1>
- <form method="post" action="{% url 'order:cancel-payment' token=order.token %}" class="checkout-form">
- {% csrf_token %}
- <p>{% blocktrans trimmed context "Payment pending text" %}
- We are currently waiting for an external service to authorize
- your payment for this order.
- {% endblocktrans %}</p>
- <p>{% trans "Current status:" context "Payment status text" %}
- <br>
- <span class="label label-default">
- {{ waiting_payment.get_status_display }}
- </span>
- </p>
- <p>{% blocktrans trimmed context "Payment pending text" %}
- Unless you are absolutely sure that the process will not complete
- (for example you have closed the browser window before paying),
- you should wait before attempting a new payment.
- Please be warned that if you try again and the previous
- transaction succeeds you might end up being charged twice.
- {% endblocktrans %}</p>
- {% bootstrap_form waiting_payment_form %}
- <button type="submit" class="btn danger">
- {% trans "I understand, allow me to pay again" context "Payment pending action" %}
- </button>
- </form>
- {% elif payment_form %}
- <h1>
- {% blocktrans trimmed context "Payment details title" %}
- Pay for order {{ order }}
- {% endblocktrans %}
- </h1>
- <form method="post" action="{% url "order:payment" token=order.token %}" class="payment-method-form radio">
- {% csrf_token %}
- {{ payment_form }}
- {% block form_submit %}
- <button type="submit" class="btn primary">
- {% trans "Proceed to payment" context "Payment details primary action" %}
- </button>
- {% endblock %}
- </form>
- {% else %}
- <p>{% trans "You've authorized transaction. Order is in processing" context "Payment details text" %}</p>
- {% endif %}
- {% endif %}
- {% endif %}
- {% include 'order/_ordered_items_table.html' %}
- </div>
+ <div class="row checkout">
+ <div class="col-lg-10 m-auto">
+ {% if order.user == user or not order.is_fully_paid %}
+ {% if not order.is_fully_paid %}
+ {% if waiting_payment %}
+ <h1>
+ {% trans "Payment pending" context "Payment details title" %}
+ </h1>
+ <form method="post" action="{% url 'order:cancel-payment' token=order.token %}" class="checkout-form">
+ {% csrf_token %}
+ <p>{% blocktrans trimmed context "Payment pending text" %}
+ We are currently waiting for an external service to authorize
+ your payment for this order.
+ {% endblocktrans %}</p>
+ <p>{% trans "Current status:" context "Payment status text" %}
+ <br>
+ <span class="label label-default">
+ {{ waiting_payment.get_status_display }}
+ </span>
+ </p>
+ <p>{% blocktrans trimmed context "Payment pending text" %}
+ Unless you are absolutely sure that the process will not complete
+ (for example you have closed the browser window before paying),
+ you should wait before attempting a new payment.
+ Please be warned that if you try again and the previous
+ transaction succeeds you might end up being charged twice.
+ {% endblocktrans %}</p>
+ {% bootstrap_form waiting_payment_form %}
+ <button type="submit" class="btn danger">
+ {% trans "I understand, allow me to pay again" context "Payment pending action" %}
+ </button>
+ </form>
+ {% elif payment_form %}
+ <h1>
+ {% blocktrans trimmed context "Payment details title" %}
+ Pay for order {{ order }}
+ {% endblocktrans %}
+ </h1>
+ <form method="post" action="{% url "order:payment" token=order.token %}" class="payment-method-form radio">
+ {% csrf_token %}
+ {{ payment_form }}
+ {% block form_submit %}
+ <button type="submit" class="btn primary">
+ {% trans "Proceed to payment" context "Payment details primary action" %}
+ </button>
+ {% endblock %}
+ </form>
+ {% else %}
+ <p>{% trans "You've authorized transaction. Order is in processing" context "Payment details text" %}</p>
+ {% endif %}
+ {% endif %}
+ {% endif %}
+ {% include 'order/_ordered_items_table.html' %}
</div>
+ </div>
{% endblock content %}
diff --git a/templates/order/payment/default.html b/templates/order/payment/default.html
index bae6b09d87..54a55c5de3 100644
--- a/templates/order/payment/default.html
+++ b/templates/order/payment/default.html
@@ -4,16 +4,16 @@
{% block forms %}
<form id="payment-form" method="{{ form.method }}"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
- {% csrf_token %}
- {{ form.media }}
- {% bootstrap_form form %}
- <div class="form-group">
- <div class="col-sm-2"></div>
- <div class="col-sm-10">
- <button type="submit" class="btn primary">
- {% trans "Save changes" context "Payment form primary action" %}
- </button>
- </div>
+ {% csrf_token %}
+ {{ form.media }}
+ {% bootstrap_form form %}
+ <div class="form-group">
+ <div class="col-sm-2"></div>
+ <div class="col-sm-10">
+ <button type="submit" class="btn primary">
+ {% trans "Save changes" context "Payment form primary action" %}
+ </button>
+ </div>
</div>
</form>
{% endblock forms %}
diff --git a/templates/order/payment/paypal_card.html b/templates/order/payment/paypal_card.html
index 9c4cd45b90..9a7c6ce47b 100644
--- a/templates/order/payment/paypal_card.html
+++ b/templates/order/payment/paypal_card.html
@@ -5,15 +5,15 @@
{% load i18n %}
{% block forms %}
- <form method="post" class="form-horizontal" novalidate>
- {% csrf_token %}
- {% bootstrap_form form layout="horizontal" %}
- <div class="form-group">
- <div class="col-sm-10 m-auto">
- <button type="submit" class="btn primary">
- {% trans "Save changes" context "Payment form (PayPal) primary action" %}
- </button>
- </div>
- </div>
- </form>
+ <form method="post" class="form-horizontal" novalidate>
+ {% csrf_token %}
+ {% bootstrap_form form layout="horizontal" %}
+ <div class="form-group">
+ <div class="col-sm-10 m-auto">
+ <button type="submit" class="btn primary">
+ {% trans "Save changes" context "Payment form (PayPal) primary action" %}
+ </button>
+ </div>
+ </div>
+ </form>
{% endblock forms %}
diff --git a/templates/order/payment/stripe.html b/templates/order/payment/stripe.html
index 30b3162c81..adb2a926e0 100644
--- a/templates/order/payment/stripe.html
+++ b/templates/order/payment/stripe.html
@@ -4,21 +4,21 @@
{% block forms %}
<form method="{{ form.method }}" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
- {% csrf_token %}
- {{ form.media }}
- {% bootstrap_form form layout='horizontal' %}
- {% if form.errors %}
- <a class="btn" href="{% url "order:details" token=payment.order.token %}">
- {% trans "Change payment method" context "Payment form (Stripe) secondary action" %}
- </a>
- {% endif %}
- <div class="form-group">
- <div class="col-sm-2"></div>
- <div class="col-sm-10">
- <button type="submit" class="btn primary">
- {% trans "Save changes" context "Payment form primary action" %}
- </button>
- </div>
+ {% csrf_token %}
+ {{ form.media }}
+ {% bootstrap_form form layout='horizontal' %}
+ {% if form.errors %}
+ <a class="btn" href="{% url "order:details" token=payment.order.token %}">
+ {% trans "Change payment method" context "Payment form (Stripe) secondary action" %}
+ </a>
+ {% endif %}
+ <div class="form-group">
+ <div class="col-sm-2"></div>
+ <div class="col-sm-10">
+ <button type="submit" class="btn primary">
+ {% trans "Save changes" context "Payment form primary action" %}
+ </button>
</div>
+ </div>
</form>
{% endblock forms %}
diff --git a/templates/order/success.html b/templates/order/success.html
index a720d1d2bc..8fd36b3905 100644
--- a/templates/order/success.html
+++ b/templates/order/success.html
@@ -13,25 +13,25 @@
{% endblock content %}
{% block google-analytics-script %}
- {{ block.super }}
- __ga('require', 'ecommerce', 'ecommerce.js');
- __ga('set', 'currencyCode', '{{ DEFAULT_CURRENCY }}');
- __ga('ecommerce:addTransaction', {
- 'id': '{{ order.id }}',
- 'affiliation': 'Saleor',
- 'revenue': '{{ order.get_total.gross }}',
- 'shipping': '{{ order.shipping_price.gross }}',
- 'tax': '{{ order.get_total.tax }}'
+ {{ block.super }}
+ __ga('require', 'ecommerce', 'ecommerce.js');
+ __ga('set', 'currencyCode', '{{ DEFAULT_CURRENCY }}');
+ __ga('ecommerce:addTransaction', {
+ 'id': '{{ order.id }}',
+ 'affiliation': 'Saleor',
+ 'revenue': '{{ order.get_total.gross }}',
+ 'shipping': '{{ order.shipping_price.gross }}',
+ 'tax': '{{ order.get_total.tax }}'
+ });
+ {% for item in order.get_lines %}
+ __ga('ecommerce:addItem', {
+ 'id': '{{ item.id }}',
+ 'name': '{{ item }}',
+ 'sku': '{{ item.sku }}',
+ 'category': '{{ item.product.category }}',
+ 'price': '{{ item.unit_price_gross }}',
+ 'quantity': '{{ item.quantity }}'
});
- {% for item in order.get_lines %}
- __ga('ecommerce:addItem', {
- 'id': '{{ item.id }}',
- 'name': '{{ item }}',
- 'sku': '{{ item.sku }}',
- 'category': '{{ item.product.category }}',
- 'price': '{{ item.unit_price_gross }}',
- 'quantity': '{{ item.quantity }}'
- });
- {% endfor %}
- __ga('ecommerce:send');
+ {% endfor %}
+ __ga('ecommerce:send');
{% endblock google-analytics-script %}
diff --git a/templates/payments/credit_card_expiry_widget.html b/templates/payments/credit_card_expiry_widget.html
index 107b979637..5c0c681a18 100644
--- a/templates/payments/credit_card_expiry_widget.html
+++ b/templates/payments/credit_card_expiry_widget.html
@@ -1,9 +1,9 @@
<div class="row">
- {% with widget.subwidgets.0 as month %}
- {% with widget.subwidgets.1 as year %}
- <div class="col-6">{% include month.template_name with widget=month %}</div>
- <span class="text-center align-bottom position-absolute w-100 checkout__payments-card-expiry-slash">/</span>
- <div class="col-6">{% include year.template_name with widget=year %}</div>
- {% endwith %}
+ {% with widget.subwidgets.0 as month %}
+ {% with widget.subwidgets.1 as year %}
+ <div class="col-6">{% include month.template_name with widget=month %}</div>
+ <span class="text-center align-bottom position-absolute w-100 checkout__payments-card-expiry-slash">/</span>
+ <div class="col-6">{% include year.template_name with widget=year %}</div>
{% endwith %}
+ {% endwith %}
</div>
diff --git a/templates/prices/widget.html b/templates/prices/widget.html
index 356dcfb3c7..b4ac31541e 100644
--- a/templates/prices/widget.html
+++ b/templates/prices/widget.html
@@ -1,4 +1,4 @@
<div class="input-with-suffix">
- {{ widget }}
- <div class="input-text-suffix">{{ currency }}</div>
+ {{ widget }}
+ <div class="input-text-suffix">{{ currency }}</div>
</div>
diff --git a/templates/product/_price_range.html b/templates/product/_price_range.html
index b3a343f16d..d79ac36e05 100644
--- a/templates/product/_price_range.html
+++ b/templates/product/_price_range.html
@@ -2,7 +2,7 @@
{% load gross from prices_i18n %}
<span>
- <span>
- {% if price_range.min_price != price_range.max_price %}{% trans "from" context "product price range" %} {% endif %}{% gross price_range.min_price html=True %}
- </span>
+ <span>
+ {% if price_range.min_price != price_range.max_price %}{% trans "from" context "product price range" %} {% endif %}{% gross price_range.min_price html=True %}
+ </span>
</span>
diff --git a/templates/product/details.html b/templates/product/details.html
index a8ca17d390..1d3522abd7 100644
--- a/templates/product/details.html
+++ b/templates/product/details.html
@@ -49,8 +49,8 @@
{% if not is_visible %}
<div class="alert alert-warning" role="alert">
{% blocktrans trimmed with date=product.available_on|date context "Product details text" %}
- <strong>Warning!</strong>
- You are previewing a product that will become visible on <strong>{{ date }}</strong>.
+ <strong>Warning!</strong>
+ You are previewing a product that will become visible on <strong>{{ date }}</strong>.
{% endblocktrans %}
</div>
{% endif %}
diff --git a/templates/search/results.html b/templates/search/results.html
index e2fdfba75e..b4e619880b 100644
--- a/templates/search/results.html
+++ b/templates/search/results.html
@@ -6,36 +6,36 @@
{% block title %}{% trans "Search results" context "Search page title" %} {{ block.super }}{% endblock %}
{% block breadcrumb %}
- {{ block.super }}
- {% for breadcrumb in breadcrumbs %}
- <li{% if forloop.last %} class="active"{% endif %}>
- {% if not forloop.last %}
- <a href="{{ breadcrumb.get_absolute_url }}">{{ breadcrumb }}</a>
- {% else %}
- <span>{{ breadcrumb }}</span>
- {% endif %}
- </li>
- {% endfor %}
+ {{ block.super }}
+ {% for breadcrumb in breadcrumbs %}
+ <li{% if forloop.last %} class="active"{% endif %}>
+ {% if not forloop.last %}
+ <a href="{{ breadcrumb.get_absolute_url }}">{{ breadcrumb }}</a>
+ {% else %}
+ <span>{{ breadcrumb }}</span>
+ {% endif %}
+ </li>
+ {% endfor %}
{% endblock breadcrumb %}
{% block content %}
- <div class="row home__featured">
- <div class="col-12">
- {% if query and results %}
- <div class="row">
- {% include "category/_items.html" with products=results %}
- </div>
- {% bootstrap_pagination results url=query_string %}
- {% else %}
- <div class="row no-results">
- <div class="col-12">
- <h2>{% trans "Search:" %} <strong>{{ query }}</strong></h2>
- <svg data-src="{% static "images/no-results-bg.svg" %}" width="360" height="360"/>
- <p>{% trans "Sorry, no matches found for your request." context "Search without results text" %}</p>
- <p>{% trans "Try again or shop new arrivals." context "Search without results text" %}</p>
- </div>
- </div>
- {% endif %}
+ <div class="row home__featured">
+ <div class="col-12">
+ {% if query and results %}
+ <div class="row">
+ {% include "category/_items.html" with products=results %}
</div>
+ {% bootstrap_pagination results url=query_string %}
+ {% else %}
+ <div class="row no-results">
+ <div class="col-12">
+ <h2>{% trans "Search:" %} <strong>{{ query }}</strong></h2>
+ <svg data-src="{% static "images/no-results-bg.svg" %}" width="360" height="360"/>
+ <p>{% trans "Sorry, no matches found for your request." context "Search without results text" %}</p>
+ <p>{% trans "Try again or shop new arrivals." context "Search without results text" %}</p>
+ </div>
+ </div>
+ {% endif %}
</div>
+ </div>
{% endblock content %}
diff --git a/templates/userprofile/address_delete.html b/templates/userprofile/address_delete.html
index 950c39a7c0..b7a20c1c4f 100644
--- a/templates/userprofile/address_delete.html
+++ b/templates/userprofile/address_delete.html
@@ -3,10 +3,10 @@
<form method="post" novalidate action="{% url 'profile:address-delete' pk=address.pk %}">
{% csrf_token %}
<button type="submit" class="btn danger narrow float-right">
- {% trans "Remove Address" context "Remove address form action" %}
+ {% trans "Remove Address" context "Remove address form action" %}
</button>
<a class="btn btn-link cancel float-md-right">
- {% trans "Cancel" context "Remove address form action" %}
+ {% trans "Cancel" context "Remove address form action" %}
</a>
</form>
</div>
diff --git a/templates/userprofile/address_edit.html b/templates/userprofile/address_edit.html
index deef0fbe29..d38a2e70d2 100644
--- a/templates/userprofile/address_edit.html
+++ b/templates/userprofile/address_edit.html
@@ -3,53 +3,55 @@
{% load i18n %}
{% block title %}
- {% if address_form.instance.pk %}
- {% trans "Edit address" context "Edit address page title" %}
- {% else %}
- {% trans "New address" context "New address page title" %}
- {% endif %} — {{ block.super }}{% endblock %}
+ {% if address_form.instance.pk %}
+ {% trans "Edit address" context "Edit address page title" %}
+ {% else %}
+ {% trans "New address" context "New address page title" %}
+ {% endif %} — {{ block.super }}{% endblock %}
{% block breadcrumb %}
<ul class="breadcrumbs list-unstyled">
<li><a href="{% url 'home' %}">
- {% trans "Home" context "Main navigation item" %}
+ {% trans "Home" context "Main navigation item" %}
</a></li>
- <li><a href="{% url "profile:details" %}">
+ <li>
+ <a href="{% url "profile:details" %}">
{% trans "Your profile" context "Edit/new address breadcrumb" %}
- </a></li>
+ </a>
+ </li>
{% if address_form.instance.pk %}
- <li><a href=".">
- {% trans "Edit address" context "Edit address breadcrumb" %}
- </a></li>
+ <li><a href=".">
+ {% trans "Edit address" context "Edit address breadcrumb" %}
+ </a></li>
{% else %}
- <li><a href=".">
- {% trans "New address" context "New address breadcrumb" %}
- </a></li>
+ <li><a href=".">
+ {% trans "New address" context "New address breadcrumb" %}
+ </a></li>
{% endif %}
</ul>
{% endblock breadcrumb %}
{% block content %}
-<div class="row userprofile__address-edit">
+ <div class="row userprofile__address-edit">
<div class="col-sm-8 col-lg-6 m-auto">
- <form method="post" novalidate>
- {% csrf_token %}
- <h2 class="text-center">
- {% if address_form.instance.pk %}
- {% trans "Edit address" context "Edit address title" %}
- {% else %}
- {% trans "New address" context "New address title" %}
- {% endif %}
- </h2>
- <div class="userprofile__address-edit__form">
- {% include "userprofile/snippets/address_form.html" %}
- </div>
- <p class="text-right">
- <button type="submit" class="btn primary narrow">
- {% trans "Save changes" context "Edit/new address primary action" %}
- </button>
- </p>
- </form>
+ <form method="post" novalidate>
+ {% csrf_token %}
+ <h2 class="text-center">
+ {% if address_form.instance.pk %}
+ {% trans "Edit address" context "Edit address title" %}
+ {% else %}
+ {% trans "New address" context "New address title" %}
+ {% endif %}
+ </h2>
+ <div class="userprofile__address-edit__form">
+ {% include "userprofile/snippets/address_form.html" %}
+ </div>
+ <p class="text-right">
+ <button type="submit" class="btn primary narrow">
+ {% trans "Save changes" context "Edit/new address primary action" %}
+ </button>
+ </p>
+ </form>
</div>
-</div>
+ </div>
{% endblock content %}
diff --git a/templates/userprofile/details.html b/templates/userprofile/details.html
index f93d32421f..e162ba3ecf 100644
--- a/templates/userprofile/details.html
+++ b/templates/userprofile/details.html
@@ -13,7 +13,7 @@
{% block breadcrumb %}
<ul class="breadcrumbs list-unstyled">
<li><a href="{% url 'home' %}">
- {% trans "Home" context "Main navigation item" %}
+ {% trans "Home" context "Main navigation item" %}
</a></li>
<li>{% trans "Your account" context "Main navigation item" %} (<b>{{ user }}</b>)</li>
</ul>
@@ -96,7 +96,7 @@
</div>
{% else %}
<h3 class="text-sm-center userprofile__orders-empty">
- {% trans "There are not any completed orders yet." context "No recent orders text" %}
+ {% trans "There are not any completed orders yet." context "No recent orders text" %}
</h3>
{% endif %}
</div>
@@ -105,10 +105,10 @@
<div class="row ">
<div class="col-md-8 col-lg-6 m-auto userprofile__password">
<form action="" method="post">
- {% csrf_token %}
- {% bootstrap_form change_password_form %}
- <input type="submit" class="btn primary narrow"
- value="{% trans "Change password" context "User profile action" %}">
+ {% csrf_token %}
+ {% bootstrap_form change_password_form %}
+ <input type="submit" class="btn primary narrow"
+ value="{% trans "Change password" context "User profile action" %}">
</form>
</div>
</div>
@@ -116,26 +116,28 @@
<div class="tab-pane fade" id="addresses" role="tabpanel">
<div class="card-deck-wrapper userprofile__addresses">
<div class="row card-deck">
- {% for address in addresses %}
- <div class="col-md-6">
- <div class="card card-block">
- {% format_address address %}
- <ul class="icons">
- <li><a href="{% url "profile:address-edit" pk=address.pk %}">
- {% trans "Edit" context "User address action" %}
- </a></li>
- <li><a class="delete-icon"><svg data-src="{% static "images/delete.svg" %}" height="20px" width="20px" /></a></li>
- </ul>
- {% include "userprofile/address_delete.html" with pk=address.pk %}
- </div>
+ {% for address in addresses %}
+ <div class="col-md-6">
+ <div class="card card-block">
+ {% format_address address %}
+ <ul class="icons">
+ <li><a href="{% url "profile:address-edit" pk=address.pk %}">
+ {% trans "Edit" context "User address action" %}
+ </a></li>
+ <li><a class="delete-icon">
+ <svg data-src="{% static "images/delete.svg" %}" height="20px" width="20px" />
+ </a></li>
+ </ul>
+ {% include "userprofile/address_delete.html" with pk=address.pk %}
</div>
- {% endfor %}
- </div>
- {% if addresses|length == 0 %}
- <h3 class="text-sm-center">
- {% trans "You will see new addresses here after first successful checkout." context "No addresses text" %}
- </h3>
- {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+ {% if addresses|length == 0 %}
+ <h3 class="text-sm-center">
+ {% trans "You will see new addresses here after first successful checkout." context "No addresses text" %}
+ </h3>
+ {% endif %}
</div>
</div>
</div>
diff --git a/templates/weight_field_widget.html b/templates/weight_field_widget.html
index 9ff3227215..82cb044c67 100644
--- a/templates/weight_field_widget.html
+++ b/templates/weight_field_widget.html
@@ -1,4 +1,4 @@
<div class="input-with-suffix">
- {{ widget }}
- <div class="input-text-suffix">{{ unit }}</div>
+ {{ widget }}
+ <div class="input-text-suffix">{{ unit }}</div>
</div>