def iter_param_info(cls, regform, registration):
     yield None, _(
         "The price the registrant needs to pay (e.g. 100.00 or 100.25)")
     yield 'short', _(
         "The price without cents if possible (e.g. 100 or 100.25)")
     yield 'int', _(
         "The price formatted as an integer (e.g. 10000 or 10025)")
Beispiel #2
0
class PluginSettingsForm(PaymentPluginSettingsFormBase):
    details = TextAreaField(_('Payment details'), [])

    def __init__(self, *args, **kwargs):
        super(PluginSettingsForm, self).__init__(*args, **kwargs)
        self.details.description = DETAILS_DESC + '\n' + render_placeholder_info(
            'manual-payment-details', regform=None, registration=None)
Beispiel #3
0
class EventSettingsForm(PaymentEventSettingsFormBase):
    details = TextAreaField(_('Payment details'), [UsedIf(lambda form, _: form.enabled.data), DataRequired()])

    def __init__(self, *args, **kwargs):
        super(EventSettingsForm, self).__init__(*args, **kwargs)
        self.details.description = DETAILS_DESC + '\n' + render_placeholder_info('manual-payment-details',
                                                                                 regform=None, registration=None)
class CurrencyPlaceholder(Placeholder):
    name = 'currency'
    description = _("The currency used in the registration")

    @classmethod
    def render(cls, regform, registration):
        return registration.currency
class EventIDPlaceholder(Placeholder):
    name = 'event_id'
    description = _("The ID of the event")

    @classmethod
    def render(cls, regform, registration):
        return registration.registration_form.event.id
Beispiel #6
0
class EventSettingsForm(PaymentEventSettingsFormBase):
    details = TextAreaField(
        _('Payment details'),
        [UsedIf(lambda form, _: form.enabled.data),
         DataRequired()],
        description=DETAILS_DESC)
Beispiel #7
0
class PluginSettingsForm(PaymentPluginSettingsFormBase):
    details = TextAreaField(_('Payment details'), [], description=DETAILS_DESC)
Beispiel #8
0
from __future__ import unicode_literals

from wtforms.fields.simple import TextAreaField
from wtforms.validators import DataRequired

from indico.core.plugins import IndicoPlugin, IndicoPluginBlueprint, url_for_plugin
from indico.modules.events.payment import (PaymentPluginMixin,
                                           PaymentPluginSettingsFormBase,
                                           PaymentEventSettingsFormBase)
from indico.web.forms.validators import UsedIf

from indico_payment_manual import _

DETAILS_DESC = _(
    'The details the user needs to make their payment. This usually includes the bank account details '
    'the IBAN and payment reference.')


class PluginSettingsForm(PaymentPluginSettingsFormBase):
    details = TextAreaField(_('Payment details'), [], description=DETAILS_DESC)


class EventSettingsForm(PaymentEventSettingsFormBase):
    details = TextAreaField(
        _('Payment details'),
        [UsedIf(lambda form, _: form.enabled.data),
         DataRequired()],
        description=DETAILS_DESC)

Beispiel #9
0
from wtforms.fields.simple import TextAreaField
from wtforms.validators import DataRequired

from indico.core import signals
from indico.core.plugins import IndicoPlugin, IndicoPluginBlueprint, url_for_plugin
from indico.modules.events.payment import (PaymentEventSettingsFormBase, PaymentPluginMixin,
                                           PaymentPluginSettingsFormBase)
from indico.util.placeholders import render_placeholder_info, replace_placeholders
from indico.web.forms.validators import UsedIf

from indico_payment_manual import _


DETAILS_DESC = _('The details the user needs to make their payment. This usually includes the bank account details, '
                 'the IBAN and payment reference.  You can also link to a custom payment site. In this case make sure '
                 'to use the URL-escaped versions of the placeholders where available.')


class PluginSettingsForm(PaymentPluginSettingsFormBase):
    details = TextAreaField(_('Payment details'), [])

    def __init__(self, *args, **kwargs):
        super(PluginSettingsForm, self).__init__(*args, **kwargs)
        self.details.description = DETAILS_DESC + '\n' + render_placeholder_info('manual-payment-details',
                                                                                 regform=None, registration=None)


class EventSettingsForm(PaymentEventSettingsFormBase):
    details = TextAreaField(_('Payment details'), [UsedIf(lambda form, _: form.enabled.data), DataRequired()])
Beispiel #10
0
from wtforms.fields.simple import TextAreaField
from wtforms.validators import DataRequired

from indico.core import signals
from indico.core.plugins import IndicoPlugin, IndicoPluginBlueprint, url_for_plugin
from indico.modules.events.payment import (PaymentEventSettingsFormBase,
                                           PaymentPluginMixin,
                                           PaymentPluginSettingsFormBase)
from indico.util.placeholders import render_placeholder_info, replace_placeholders
from indico.web.forms.validators import UsedIf

from indico_payment_manual import _

DETAILS_DESC = _(
    'The details the user needs to make their payment. This usually includes the bank account details, '
    'the IBAN and payment reference.  You can also link to a custom payment site. In this case make sure '
    'to use the URL-escaped versions of the placeholders where available.')


class PluginSettingsForm(PaymentPluginSettingsFormBase):
    details = TextAreaField(_('Payment details'), [])

    def __init__(self, *args, **kwargs):
        super(PluginSettingsForm, self).__init__(*args, **kwargs)
        self.details.description = DETAILS_DESC + '\n' + render_placeholder_info(
            'manual-payment-details', regform=None, registration=None)


class EventSettingsForm(PaymentEventSettingsFormBase):
    details = TextAreaField(
        _('Payment details'),
class EmailPlaceholder(EscapablePlaceholder):
    name = 'email'
    basic_description = _("Email address of the registrant")
    field = 'email'
class LastNamePlaceholder(EscapablePlaceholder):
    name = 'last_name'
    basic_description = _("Last name of the registrant")
    field = 'last_name'
 def iter_param_info(cls, regform, registration):
     yield None, cls.basic_description
     yield 'url', '{} ({})'.format(cls.basic_description, _('escaped for URLs'))
Beispiel #14
0
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from __future__ import unicode_literals

from wtforms.fields.simple import TextAreaField
from wtforms.validators import DataRequired

from indico.core.plugins import IndicoPlugin, IndicoPluginBlueprint, url_for_plugin
from indico.modules.events.payment import (PaymentPluginMixin, PaymentPluginSettingsFormBase,
                                           PaymentEventSettingsFormBase)
from indico.web.forms.validators import UsedIf

from indico_payment_manual import _


DETAILS_DESC = _('The details the user needs to make their payment. This usually includes the bank account details '
                 'the IBAN and payment reference.')


class PluginSettingsForm(PaymentPluginSettingsFormBase):
    details = TextAreaField(_('Payment details'), [], description=DETAILS_DESC)


class EventSettingsForm(PaymentEventSettingsFormBase):
    details = TextAreaField(_('Payment details'), [UsedIf(lambda form, _: form.enabled.data), DataRequired()],
                            description=DETAILS_DESC)


class ManualPaymentPlugin(PaymentPluginMixin, IndicoPlugin):
    """Bank Transfer

    Provides a payment method where bank details etc. are shown to the user
Beispiel #15
0
 def iter_param_info(cls, regform, registration):
     yield None, _("The price the registrant needs to pay (e.g. 100.00 or 100.25)")
     yield 'short', _("The price without cents if possible (e.g. 100 or 100.25)")
     yield 'int', _("The price formatted as an integer (e.g. 10000 or 10025)")
Beispiel #16
0
 def iter_param_info(cls, regform, registration):
     yield None, cls.basic_description
     yield 'url', '{} ({})'.format(cls.basic_description, _('escaped for URLs'))