From 0747f5b8b845438591d31dad4971aaaafc5d21b9 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 27 Jan 2021 10:48:40 +0100 Subject: [PATCH] Freshen up layout of refund choice page --- src/pretix/base/payment.py | 2 +- .../pretixcontrol/order/refund_choose.html | 61 ++++++++++--------- .../banktransfer/new_refund_control_form.html | 1 - .../static/pretixcontrol/scss/_forms.scss | 16 ++--- 4 files changed, 37 insertions(+), 43 deletions(-) diff --git a/src/pretix/base/payment.py b/src/pretix/base/payment.py index 4c4700ed20..65dc60026a 100644 --- a/src/pretix/base/payment.py +++ b/src/pretix/base/payment.py @@ -950,7 +950,7 @@ class ManualPayment(BasePaymentProvider): @property def public_name(self): - return str(self.settings.get('public_name', as_type=LazyI18nString)) + return str(self.settings.get('public_name', as_type=LazyI18nString) or _('Manual payment')) @property def settings_form_fields(self): diff --git a/src/pretix/control/templates/pretixcontrol/order/refund_choose.html b/src/pretix/control/templates/pretixcontrol/order/refund_choose.html index ee77a4949f..814386e2b0 100644 --- a/src/pretix/control/templates/pretixcontrol/order/refund_choose.html +++ b/src/pretix/control/templates/pretixcontrol/order/refund_choose.html @@ -35,18 +35,17 @@ {% trans "Payment" %} {% trans "Payment details" %} {% trans "Amount not refunded" %} - {% trans "Refund" %} + {% trans "Refund amount" %} {% for p in payments %} {{ p.full_id }}
{{ p.payment_date|date:"SHORT_DATETIME_FORMAT" }}
{{ p.payment_provider.verbose_name }} - {{ p.html_info|safe }} + {{ p.html_info|default_if_none:""|safe }} {{ p.available_amount|money:request.event.currency }} - + {% if p.partial_refund_possible %} - {% trans "Automatically refund" context "amount_label" %}
- {% trans "Automatically refund full amount" %} + {% trans "Full amount" %} ({{ p.amount|money:request.event.currency }}) {% else %} - {% trans "This payment method does not support automatic refunds." %} + {% trans "This payment method does not support automatic refunds." %} {% endif %} @@ -82,7 +81,8 @@ {% trans "Payment method" %} - {% trans "Refund" %} + {% trans "Receipient / options" %} + {% trans "Refund amount" %} @@ -94,7 +94,9 @@ - {% trans "Automatically refund" context "amount_label" %} + {{ form|safe }} + +
-
- {{ form|safe }} {% endfor %} {% trans "Transfer to other order" %} - {% trans "Transfer" context "amount_label" %} + + +
@@ -119,17 +122,18 @@ {{ request.event.currency }}
- {% trans "to" context "order_label" %} - - {% trans "Create a new gift card" %} +
+ {% trans "The gift card can be used to buy tickets for all events of this organizer." %} +
+ +
-
- {% trans "The gift card can be used to buy tickets for all events of this organizer." %} -
- {% trans "Manual refund" %} - {% trans "Manually refund" context "amount_label" %} +
+ + + +
{{ request.event.currency }} -

- - +
- diff --git a/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/new_refund_control_form.html b/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/new_refund_control_form.html index 7c957c8717..822a27854d 100644 --- a/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/new_refund_control_form.html +++ b/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/new_refund_control_form.html @@ -2,7 +2,6 @@ {% load ibanformat %} {% load bootstrap3 %} -{% trans "to" context "refund_recipient" %} {% bootstrap_field form.payer layout="inline" %} {% bootstrap_field form.iban layout="inline" %} {% bootstrap_field form.bic layout="inline" %} diff --git a/src/pretix/static/pretixcontrol/scss/_forms.scss b/src/pretix/static/pretixcontrol/scss/_forms.scss index e062fd91ff..18279f0463 100644 --- a/src/pretix/static/pretixcontrol/scss/_forms.scss +++ b/src/pretix/static/pretixcontrol/scss/_forms.scss @@ -512,17 +512,11 @@ table td > .checkbox input[type="checkbox"] { .form-refund-choose { .payment-details { max-width: 200px; - overflow: hidden; - dt { - float: none; - text-align: left; - font-weight: normal; - width: auto; - color: $text-muted; - } - dd { - margin-left: 0px; - word-break: break-word; + } + .refund-amount { + width: 250px; + input.form-control { + width: 100px; } } }