Working book shop.
[prawokultury.git] / shop / templates / shop / snippets / order_form.html
index c513025..a1f00e9 100755 (executable)
@@ -1,13 +1,22 @@
-{% load i18n %}
+{% load i18n staticfiles %}
 {% load url from future %}
 
-<form action="{% url 'shop_buy' form.offer.entry.slug %}" method="post">
+<form class="submit-form" action="{% url 'shop_buy' form.offer.entry.slug %}" method="post">
     <table>
-    {{ form.as_table }}
-    <tr><td></td><td>
-        <button type="submit" style="border: none; background: none; cursor: pointer">
-        <img alt="{% trans 'Donate!' %}" src="{% static 'img/payu.png' % }" />
-        </button>
+        {{ form.as_table }}
+
+        <tr><th>{% trans "Payment and shipping costs" %}:</th><td style="font-size:1.2em;" id="cost-costs">
+                {{ form.offer.cost_const|floatformat:"-2" }} zł
+                + {{ form.offer.cost_per_item|floatformat:"-2" }} zł {% trans "for each copy" %}
+            </td></tr>
+        <tr><th>{% trans "Final cost" %}:</th><td id="cost-final" style="font-size:1.5em;">
+                {{ form.offer.total_per_item|floatformat:"-2" }} zł {% trans "for each copy" %}
+                + {{ form.offer.cost_const|floatformat:"-2" }} zł
+            </td></tr>
+        <tr><td></td><td>
+            <button type="submit" style="border: none; background: none; cursor: pointer">
+            <img alt="{% trans 'Donate!' %}" src="{% static 'img/payu.png' %}" />
+            </button>
         </td></tr>
     </table>
 </form>