Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Improve order forms styles
Paweł Kowalewskid8f4442bc35d
diff --git a/saleor/order/templates/order/details.html b/saleor/order/templates/order/details.htmlindex 4a220e3bbd..72271aa730 100644--- a/saleor/order/templates/order/details.html+++ b/saleor/order/templates/order/details.html@@ -1,6 +1,6 @@{% extends "base.html" %}-{% load as_horizontal_form from bootstrap %}+{% load as_vertical_form from bootstrap %}{% load gross from prices_i18n %}{% load i18n %}@@ -104,33 +104,38 @@{% endfor %}{% if order.user == user or not order.is_fully_paid %}{% if not order.is_fully_paid %}- {% if waiting_payment %}- <form method="post" action="{% url 'order:cancel-payment' token=order.token %}">- {% csrf_token %}- <h3>{% trans "Payment pending" %}</h3>- <p>{% trans "We are currently waiting for an external service to authorize your payment for this order." %}</p>- <p>{% trans "Current status" %}: <span class="label label-default">{{ waiting_payment.get_status_display }}</span></p>- <p>{% trans "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." %}</p>- {{ waiting_payment_form|as_horizontal_form }}- <button type="submit" class="btn btn-danger">{% trans "I understand, allow me to pay again" %}</button>- </form>- {% else %}- <form method="post" action="{% url "order:details" token=order.token %}" class="form form-horizontal">- {% csrf_token %}- <h3>{% trans "Pay for your order" %}</h3>- {{ payment_form|as_horizontal_form }}- <div class="form-group">- <label class="col-sm-2"></label>- <div class="col-sm-10">- {% block form_submit %}- <button type="submit" class="btn btn-primary">- {% trans "Make a payment" %}- </button>- {% endblock %}+ <div class="row">+ <div class="col-sm-6">+ <div class="panel panel-default">+ <div class="panel-body">+ {% if waiting_payment %}+ <form method="post" action="{% url 'order:cancel-payment' token=order.token %}">+ {% csrf_token %}+ <legend>{% trans "Payment pending" %}</legend>+ <p>{% trans "We are currently waiting for an external service to authorize your payment for this order." %}</p>+ <p>{% trans "Current status" %}: <span class="label label-default">{{ waiting_payment.get_status_display }}</span></p>+ <p>{% trans "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." %}</p>+ {{ waiting_payment_form|as_vertical_form }}+ <button type="submit" class="btn btn-danger">{% trans "I understand, allow me to pay again" %}</button>+ </form>+ {% else %}+ <form method="post" action="{% url "order:details" token=order.token %}">+ {% csrf_token %}+ <legend>{% trans "Pay for your order" %}</legend>+ {{ payment_form|as_vertical_form }}+ <div class="form-group">+ {% block form_submit %}+ <button type="submit" class="btn btn-primary">+ {% trans "Make a payment" %}+ </button>+ {% endblock %}+ </div>+ </form>+ {% endif %}</div></div>- </form>- {% endif %}+ </div>+ </div>{% endif %}{% if payments %}<h3>{% trans "Payment history" %}</h3>diff --git a/saleor/order/templates/order/payment/default.html b/saleor/order/templates/order/payment/default.htmlindex 00d4f3c1b4..010ccde4da 100644--- a/saleor/order/templates/order/payment/default.html+++ b/saleor/order/templates/order/payment/default.html@@ -1,18 +1,24 @@{% extends "order/payment/details.html" %}-{% load as_horizontal_form from bootstrap %}+{% load as_vertical_form from bootstrap %}{% load i18n %}{% block forms %}-<form method="{{ form.method }}" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %}>- {% csrf_token %}- {{ form.media }}- {{ form|as_horizontal_form }}- <div class="form-group">- <div class="col-sm-offset-2 col-sm-10">- <button type="submit" class="btn btn-primary">- {% trans "Save changes" %}- </button>+<div class="row">+ <div class="col-sm-6">+ <div class="panel panel-default">+ <div class="panel-body">+ <form method="{{ form.method }}"{% if form.action %} action="{{ form.action }}"{% endif %}>+ {% csrf_token %}+ {{ form.media }}+ {{ form|as_vertical_form }}+ <div class="form-group">+ <button type="submit" class="btn btn-primary">+ {% trans "Save changes" %}+ </button>+ </div>+ </form>+ </div></div></div>-</form>+</div>{% endblock forms %}