diff --git a/src/pretix/base/payment.py b/src/pretix/base/payment.py index eb8e47526..516ab16e3 100644 --- a/src/pretix/base/payment.py +++ b/src/pretix/base/payment.py @@ -176,6 +176,7 @@ class BasePaymentProvider: help_text=_('Will be printed just below the payment figures and above the closing text on invoices.'), required=False, widget=I18nTextarea, + widget_kwargs={'attrs': {'rows': '2'}} )), ]) diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index 7f6965bba..0dc2712e7 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -107,6 +107,9 @@ class EventWizardBasicsForm(I18nModelForm): self.initial['timezone'] = get_current_timezone_name() self.fields['locale'].choices = [(a, b) for a, b in settings.LANGUAGES if a in self.locales] self.fields['location'].widget.attrs['rows'] = '3' + self.fields['location'].widget.attrs['placeholder'] = _( + 'Sample Conference Center\nHeidelberg, Germany' + ) self.fields['slug'].widget.prefix = build_absolute_uri(self.organizer, 'presale:organizer.index') if self.has_subevents: del self.fields['presale_start'] @@ -196,6 +199,9 @@ class EventUpdateForm(I18nModelForm): super().__init__(*args, **kwargs) self.fields['slug'].widget.attrs['readonly'] = 'readonly' self.fields['location'].widget.attrs['rows'] = '3' + self.fields['location'].widget.attrs['placeholder'] = _( + 'Sample Conference Center\nHeidelberg, Germany' + ) class Meta: model = Event @@ -352,13 +358,13 @@ class EventSettingsForm(SettingsForm): label=_("Imprint URL"), required=False, ) - confirm_text = forms.CharField( + confirm_text = I18nFormField( label=_('Confirmation text'), help_text=_('This text needs to be confirmed by the user before a purchase is possible. You could for example ' 'link your terms of service here. If you use the Pages feature to publish your terms of service, ' 'you don\'t need this setting since you can configure it there.'), required=False, - widget=forms.Textarea(attrs={"rows": 3}) + widget=I18nTextarea ) contact_mail = forms.EmailField( label=_("Contact address"), @@ -387,6 +393,14 @@ class EventSettingsForm(SettingsForm): }) return data + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.fields['confirm_text'].widget.attrs['rows'] = '3' + self.fields['confirm_text'].widget.attrs['placeholder'] = _( + 'e.g. I hereby confirm that I have read and agree with the event organizer\'s terms of service ' + 'and agree with them.' + ) + class PaymentSettingsForm(SettingsForm): payment_term_days = forms.IntegerField( @@ -538,25 +552,51 @@ class InvoiceSettingsForm(SettingsForm): choices=[] ) invoice_address_from = forms.CharField( - widget=forms.Textarea(attrs={'rows': 5}), required=False, + widget=forms.Textarea(attrs={ + 'rows': 5, + 'placeholder': _( + 'Sample Event Company\n' + 'Albert Einstein Road 52\n' + '12345 Samplecity' + ) + }), + required=False, label=_("Your address"), help_text=_("Will be printed as the sender on invoices. Be sure to include relevant details required in " - "your jurisdiction (e.g. your VAT ID).") + "your jurisdiction.") ) invoice_introductory_text = I18nFormField( widget=I18nTextarea, + widget_kwargs={'attrs': { + 'rows': 3, + 'placeholder': _( + 'e.g. With this document, we sent you the invoice for your ticket order.' + ) + }}, required=False, label=_("Introductory text"), help_text=_("Will be printed on every invoice above the invoice rows.") ) invoice_additional_text = I18nFormField( widget=I18nTextarea, + widget_kwargs={'attrs': { + 'rows': 3, + 'placeholder': _( + 'e.g. Thank you for your purchase! You can find more information on the event at ...' + ) + }}, required=False, label=_("Additional text"), help_text=_("Will be printed on every invoice below the invoice total.") ) invoice_footer_text = I18nFormField( widget=I18nTextarea, + widget_kwargs={'attrs': { + 'rows': 5, + 'placeholder': _( + 'e.g. your bank details, legal details like your VAT ID, registration numbers, etc.' + ) + }}, required=False, label=_("Footer"), help_text=_("Will be printed centered and in a smaller font at the end of every invoice page.") @@ -599,7 +639,13 @@ class MailSettingsForm(SettingsForm): required=False, widget=I18nTextarea, help_text=_("This will be attached to every email. Available placeholders: {event}"), - validators=[PlaceholderValidator(['{event}'])] + validators=[PlaceholderValidator(['{event}'])], + widget_kwargs={'attrs': { + 'rows': '4', + 'placeholder': _( + 'e.g. your contact details' + ) + }} ) mail_text_order_placed = I18nFormField( @@ -704,14 +750,17 @@ class MailSettingsForm(SettingsForm): ) smtp_host = forms.CharField( label=_("Hostname"), - required=False + required=False, + widget=forms.TextInput(attrs={'placeholder': 'mail.example.org'}) ) smtp_port = forms.IntegerField( label=_("Port"), - required=False + required=False, + widget=forms.TextInput(attrs={'placeholder': 'e.g. 587, 465, 25, ...'}) ) smtp_username = forms.CharField( label=_("Username"), + widget=forms.TextInput(attrs={'placeholder': 'myuser@example.org'}), required=False ) smtp_password = forms.CharField( diff --git a/src/pretix/control/forms/item.py b/src/pretix/control/forms/item.py index f5ea54fd8..a8730a0e4 100644 --- a/src/pretix/control/forms/item.py +++ b/src/pretix/control/forms/item.py @@ -268,6 +268,11 @@ class ItemUpdateForm(I18nModelForm): super().__init__(*args, **kwargs) self.fields['category'].queryset = self.instance.event.categories.all() self.fields['tax_rule'].queryset = self.instance.event.tax_rules.all() + self.fields['description'].widget.attrs['placeholder'] = _( + 'e.g. This reduced price is available for full-time students, jobless and people ' + 'over 65. This ticket includes access to all parts of the event, except the VIP ' + 'area.' + ) class Meta: model = Item diff --git a/src/pretix/plugins/banktransfer/payment.py b/src/pretix/plugins/banktransfer/payment.py index 74b0c66bf..a5f39409f 100644 --- a/src/pretix/plugins/banktransfer/payment.py +++ b/src/pretix/plugins/banktransfer/payment.py @@ -19,6 +19,18 @@ class BankTransfer(BasePaymentProvider): form_field = I18nFormField( label=_('Bank account details'), widget=I18nTextarea, + help_text=_('Include everything that your customers need to send you a bank transfer payment. Within SEPA ' + 'countries, IBAN, BIC and account owner should suffice. If you have lots of international ' + 'customers, they might also need your full address and your bank\'s full address.'), + widget_kwargs={'attrs': { + 'rows': '4', + 'placeholder': _( + 'e.g. IBAN: DE12 1234 5678 8765 4321\n' + 'BIC: GENEXAMPLE1\n' + 'Account owner: John Doe\n' + 'Name of Bank: Professional Banking Institute Ltd., London' + ) + }} ) return OrderedDict( list(super().settings_form_fields.items()) + [('bank_details', form_field)]