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)
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()
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_'))
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)")
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)
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_'), )
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()])
class UserSuspendForm(Form): ends_at = FormField(OptionallyUnlimitedEndDateForm) reason = TextAreaField(u"Grund", [DataRequired()]) violation = BooleanField("Verstoß")
class OptionallyUnlimitedEndDateForm(Form): unlimited = BooleanField(u"Unbegrenzte Dauer", default=False) date = DateField(u"Ende", [OptionalIf("unlimited")])
class OptionallyDirectBeginDateForm(Form): now = BooleanField(u"Sofort", default=False) date = DateField(u"Beginn", [OptionalIf("now")])
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()])
class PreMemberDenyForm(Form): reason = TextAreaField("Begründung", [Optional()], filters=[empty_to_none]) inform_user = BooleanField("Nutzer per E-Mail informieren", [Optional()], default=True)
class UserMoveForm(SelectRoomForm): now = BooleanField(u"Sofort", default=False) when = DateField(u"Umzug am", [OptionalIf("now")])
class FixMT940Form(Form): mt940 = TextAreaField(u'MT940') do_import = BooleanField(u"Import durchführen", default=False)