Beispiel #1
0
class BankAccountActivitiesImportForm(Form):
    account = SelectField(u"Bankkonto", coerce=int)
    user = StringField(u"Loginname", validators=[DataRequired()])
    pin = PasswordField(u"PIN", validators=[DataRequired()])
    start_date = DateField(u"Startdatum")
    end_date = DateField(u"Enddatum")
    do_import = BooleanField(u"Import durchführen", default=False)
Beispiel #2
0
class UserEditForm(Form):
    name = TextField(u"Name", [DataRequired(message=u"Name wird benötigt!")])
    email = TextField(u"E-Mail",
                      [Optional(), Email(u"E-Mail-Adresse ist ungültig!")])
    email_forwarded = BooleanField("E-Mail Weiterleitung", default=True)
    birthdate = DateField(u"Geburtsdatum", [Optional()])
    person_id = IntegerField("Debitorennummer", [Optional()],
                             filters=[empty_to_none])
class LoginForm(BaseForm):
    email = StringField('Email Address', [
        Email(),
        validators.DataRequired(message='Forgot your email address?')
    ])
    password = PasswordField(
        'Password',
        [validators.DataRequired(message='Must provide a password. ;-)')])
    remember_me = BooleanField()
Beispiel #4
0
class EditRoomForm(CreateAddressForm):
    building = static(TextField("Wohnheim"))
    level = static(IntegerField("Etage"))
    number = TextField("Nummer")
    vo_suchname = TextField("VO Nummer",
                            validators=[Optional()],
                            filters=[empty_to_none])
    inhabitable = BooleanField("Bewohnbar", validators=[Optional()])
    _order = ('building', 'level', 'number', 'vo_suchname', 'inhabitable',
              *iter_prefixed_field_names(CreateAddressForm, 'address_'))
Beispiel #5
0
class PreMemberMergeConfirmForm(Form):
    merge_name = BooleanField("Name", [Optional()], default=True)
    merge_email = BooleanField("E-Mail", [Optional()], default=True)
    merge_person_id = BooleanField("Debitorennummer", [Optional()], default=True)
    merge_room = BooleanField("Einzug/Umzug", [Optional()], default=True)
    merge_password = BooleanField("Passwort aus der Registrierung", [Optional()], default=False)
    merge_birthdate = BooleanField("Geburtsdatum", [Optional()], default=False)
class UserForm(BaseForm):
    id = IntegerField(
        "User Id", [validators.DataRequired(message='Must provide a user id')])
    # last_login_dt = DateTimeField("Last Login Date") # datepicker_options
    # created_dt = DateTimeField("Created Date")
    identity_hash = ReadonlyTextField('ID Hash')
    role = SelectField("Role",
                       choices=[('admin', 'Admin'), ('receiver', 'Receiver'),
                                ('sender', 'Sender'), ('pending', "Pending"),
                                ("denylist", "Denied")])
    registration_attempts = IntegerField("Registration Attempts")
    comment = StringField("Comment")
    locale = SelectField("Language",
                         choices=[("en", "English"), ("es", "Spanish")])
    deleted = BooleanField("Deleted (flag)")
Beispiel #7
0
class UserMoveForm(SelectRoomForm):
    comment = TextAreaField(
        "Kommentar",
        description='Wenn gegeben Referenz zum Ticket',
        render_kw={
            'placeholder': 'ticket#<TicketNr> / <TicketNr> / ticket:<ticketId>'
        })
    now = BooleanField("Sofort", default=False)
    when = DateField("Umzug am", [OptionalIf("now")])
    when_time = TimeField("Genaue Zeit", [Optional()],
                          description="Optional. In UTC angeben.",
                          render_kw={'placeholder': 'hh:mm'})

    def get_execution_time(self, now: datetime) -> datetime:
        if self.now.data:
            return now
        assert self.when.data, "`now` checkbox deselected but no date given!"
        return utc.combine_or_midnight(self.when.data, self.when_time.data)
Beispiel #8
0
class CreateRoomForm(CreateAddressForm):
    building = QuerySelectField("Wohnheim",
                                get_label='short_name',
                                query_factory=building_query)
    level = IntegerField("Etage")
    number = TextField("Nummer")
    vo_suchname = TextField("VO Nummer",
                            validators=[Optional()],
                            filters=[empty_to_none])
    inhabitable = BooleanField("Bewohnbar", validators=[Optional()])

    _order = (
        'building',
        'level',
        'number',
        'vo_suchname',
        'inhabitable',
        *iter_prefixed_field_names(CreateAddressForm, 'address_'),
    )
Beispiel #9
0
class UserMoveOutForm(Form):
    now = BooleanField(u"Sofort", default=False)
    when = DateField(u"Auszug am", [OptionalIf("now")])
    comment = TextAreaField(u"Kommentar")
    end_membership = BooleanField(u"Mitgliedschaft/Extern beenden", [Optional()])
Beispiel #10
0
class UserSuspendForm(Form):
    ends_at = FormField(OptionallyUnlimitedEndDateForm)
    reason = TextAreaField(u"Grund", [DataRequired()])
    violation = BooleanField("Verstoß")
Beispiel #11
0
class OptionallyUnlimitedEndDateForm(Form):
    unlimited = BooleanField(u"Unbegrenzte Dauer", default=False)
    date = DateField(u"Ende", [OptionalIf("unlimited")])
Beispiel #12
0
class OptionallyDirectBeginDateForm(Form):
    now = BooleanField(u"Sofort", default=False)
    date = DateField(u"Beginn", [OptionalIf("now")])
Beispiel #13
0
class UserMoveInForm(UserMoveForm):
    now = BooleanField(u"Sofort", default=False)
    when = DateField(u"Einzug am", [OptionalIf("now")])
    birthdate = DateField(u"Geburtsdatum", [OptionalIf('mac', invert=True)])
    mac = MacField(u"MAC", [Optional()])
    begin_membership = BooleanField(u"Mitgliedschaft beginnen", [Optional()])
Beispiel #14
0
class PreMemberDenyForm(Form):
    reason = TextAreaField("Begründung", [Optional()], filters=[empty_to_none])
    inform_user = BooleanField("Nutzer per E-Mail informieren", [Optional()], default=True)
Beispiel #15
0
class UserMoveForm(SelectRoomForm):
    now = BooleanField(u"Sofort", default=False)
    when = DateField(u"Umzug am", [OptionalIf("now")])
Beispiel #16
0
class FixMT940Form(Form):
    mt940 = TextAreaField(u'MT940')
    do_import = BooleanField(u"Import durchführen", default=False)