forked from CGM_Public/pretix_original
Allow payment providers to define custom form fields / templates
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from collections import OrderedDict
|
||||
from django.template import Context
|
||||
from django.template.loader import get_template
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django import forms
|
||||
|
||||
@@ -16,3 +18,8 @@ class BankTransfer(BasePaymentProvider):
|
||||
required=False
|
||||
))
|
||||
])
|
||||
|
||||
def checkout_form_render(self, request) -> str:
|
||||
template = get_template('pretixplugins/banktransfer/checkout_payment_form.html')
|
||||
ctx = Context({'request': request, 'event': self.event, 'settings': self.settings})
|
||||
return template.render(ctx)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{% load i18n %}
|
||||
|
||||
<p>{% blocktrans trimmed %}
|
||||
After completing your purchase, we will ask you to transfer the money to the following
|
||||
bank account, using a personal reference code.
|
||||
{% endblocktrans %}</p>
|
||||
|
||||
<address>
|
||||
{{ settings.bank_details|linebreaksbr }}
|
||||
</address>
|
||||
Reference in New Issue
Block a user