Exemplo n.º 1
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)
Exemplo n.º 2
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()])
Exemplo n.º 3
0
class UserSuspendForm(Form):
    ends_at = FormField(OptionallyUnlimitedEndDateForm)
    reason = TextAreaField(u"Grund", [DataRequired()])
    violation = BooleanField("Verstoß")
Exemplo n.º 4
0
class UserLogEntry(Form):
    message = TextAreaField(u"", [DataRequired()])
Exemplo n.º 5
0
class PreMemberDenyForm(Form):
    reason = TextAreaField("Begründung", [Optional()], filters=[empty_to_none])
    inform_user = BooleanField("Nutzer per E-Mail informieren", [Optional()], default=True)
Exemplo n.º 6
0
class FixMT940Form(Form):
    mt940 = TextAreaField(u'MT940')
    do_import = BooleanField(u"Import durchführen", default=False)
Exemplo n.º 7
0
class RoomLogEntry(Form):
    message = TextAreaField("", [DataRequired()])