Ejemplo n.º 1
0
class UserCreateForm(SelectRoomFormOptional):
    name = TextField(u"Name", [DataRequired(message=u"Name wird benötigt!")])

    login = TextField(u"Login", [
        DataRequired(message=u"Login wird benötigt!"),
        Regexp(regex=User.login_regex_ci, message=u"Login ist ungültig!"),
        validate_unique_login
    ],
                      filters=[to_lowercase])
    email = TextField(u"E-Mail",
                      [Email(message=u"E-Mail ist ungueltig!"),
                       Optional()],
                      filters=[empty_to_none])
    birthdate = DateField(u"Geburtsdatum", [OptionalIf('mac', invert=True)])
    mac = MacField(u"MAC",
                   [MacAddress(message=u"MAC ist ungültig!"),
                    Optional()])
    property_groups = QuerySelectMultipleField(
        u"Gruppen",
        get_label='name',
        query_factory=property_group_user_create_query)
    annex = BooleanField(u"Host annektieren", [Optional()])
    force = BooleanField(u"* Hinweise ignorieren", [Optional()])

    _order = ("name", "building", "level", "room_number")
Ejemplo n.º 2
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)
Ejemplo n.º 3
0
class UserAddGroupMembership(Form):
    group_id = QuerySelectField(u"Gruppe",get_label='name',query_factory=group_query)
    begin_date = DateField(
        u"Beginn", [Required()], default=datetime.now, today_btn=True,
        today_highlight=True)
    unlimited = BooleanField(u"Unbegrenzte Dauer", default=False)
    end_date = DateField(u"Ende", today_btn=True, today_highlight=True)
Ejemplo n.º 4
0
class RoomForm(Form):
    number = TextField(u"Nummer")
    level = TextField(u"Etage")
    inhabitable = BooleanField(u"Bewohnbar")
    dormitory_id = QuerySelectField(u"Wohnheim",
                                    get_label='short_name',
                                    query_factory=dormitory_query)
Ejemplo n.º 5
0
class UserMoveInForm(UserMoveForm):
    mac = TextField(u"MAC",
                    [Regexp(regex=mac_regex, message=u"MAC ist ungültig!")])
    birthdate = DateField(
        u"Geburtsdatum",
        [DataRequired(message=u"Geburtsdatum wird benötigt!")])
    begin_membership = BooleanField(u"Mitgliedschaft beginnen", [Optional()])
Ejemplo n.º 6
0
class UserCreateForm(UserMoveForm):
    name = TextField(u"Name", [DataRequired(message=u"Name wird benötigt!")])
    login = TextField(u"Login", [
        DataRequired(message=u"Login wird benötigt!"),
        Regexp(regex=User.login_regex, message=u"Login ist ungültig!"),
        validate_unique_login
    ])
    email = TextField(u"E-Mail",
                      [Email(message=u"E-Mail ist ungueltig!"),
                       Optional()],
                      filters=[empty_to_none])
    mac = TextField(u"MAC", [
        OptionalIf('room_number', invert=True),
        Regexp(regex=mac_regex, message=u"MAC ist ungültig!")
    ])
    birthdate = DateField(
        u"Geburtsdatum",
        [DataRequired(message=u"Geburtsdatum wird benötigt!")])
    property_group = QuerySelectField(u"Gruppe",
                                      get_label='name',
                                      query_factory=property_group_query)

    annex = BooleanField(u"Host annektieren", [Optional()])
    force = BooleanField(u"* Hinweise ignorieren", [Optional()])
Ejemplo n.º 7
0
class UserMoveForm(SelectRoomForm):
    now = BooleanField(u"Sofort", default=False)
    when = DateField(u"Umzug am", [OptionalIf("now")])

    pass
Ejemplo n.º 8
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()])
Ejemplo n.º 9
0
class UserSuspendForm(Form):
    ends_at = FormField(OptionallyUnlimitedEndDateForm)
    reason = TextAreaField(u"Grund", [DataRequired()])
    violation = BooleanField("Verstoß")
Ejemplo n.º 10
0
class OptionallyUnlimitedEndDateForm(Form):
    unlimited = BooleanField(u"Unbegrenzte Dauer", default=False)
    date = DateField(u"Ende", [OptionalIf("unlimited")])
Ejemplo n.º 11
0
class OptionallyDirectBeginDateForm(Form):
    now = BooleanField(u"Sofort", default=False)
    date = DateField(u"Beginn", [OptionalIf("now")])
Ejemplo n.º 12
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()])
Ejemplo n.º 13
0
class FixMT940Form(Form):
    mt940 = TextAreaField(u'MT940')
    do_import = BooleanField(u"Import durchführen", default=False)
Ejemplo n.º 14
0
class UserBlockForm(Form):
    unlimited = BooleanField(u"Unbegrenzte Sperrung", default=False)
    date = DateField(
        u"Gesperrt bis", default=datetime.now, today_btn=True,
        today_highlight=True)
    reason = TextAreaField(u"Grund")
Ejemplo n.º 15
0
class UserEditGroupMembership(Form):
    begin_date = DateField(
        u"Beginn", [Required()], default=datetime.now, today_btn=True,
        today_highlight=True)
    unlimited = BooleanField(u"Unbegrenzte Mitgliedschaft", default=False)
    end_date = DateField(u"Ende", today_btn=True, today_highlight=True)
Ejemplo n.º 16
0
class UserMoveOutForm(Form):
    # when = DateField(u"Auszug am", [DataRequired()])
    comment = TextAreaField(u"Kommentar")
    end_membership = BooleanField(u"Mitgliedschaft/Extern beenden",
                                  [Optional()])