~homeworkprod/byceps

ref: 4f84d8772b72ec097f24012af3b2929dbd5732fe byceps/byceps/blueprints/shop_order_admin/forms.py -rw-r--r-- 846 bytes
4f84d877 — Jochen Kupperschmidt Collect users associated with seats and tickets in one go, make them available to the template 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""

from wtforms import RadioField, TextAreaField
from wtforms.validators import InputRequired, Length

from ...services.shop.order.models.payment import PaymentMethod
from ...util.l10n import LocalizedForm


class CancelForm(LocalizedForm):
    reason = TextAreaField('Begründung', validators=[InputRequired(), Length(max=200)])


PAYMENT_METHOD_CHOICES = [
    (PaymentMethod.bank_transfer.name, 'Überweisung'),
    (PaymentMethod.cash.name, 'Barzahlung'),
    (PaymentMethod.direct_debit.name, 'Lastschrift'),
]


class MarkAsPaidForm(LocalizedForm):
    payment_method = RadioField('Zahlungsart', choices=PAYMENT_METHOD_CHOICES , validators=[InputRequired()])