Skip to content

Commit

Permalink
added form for mpsks client
Browse files Browse the repository at this point in the history
added mpsks form implementation for etiting and adding clients
#498
  • Loading branch information
agmes4 committed Oct 27, 2024
1 parent 5b9d0b2 commit 53bdda5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sipa/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,25 @@ class ChangeMACForm(FlaskForm):
)


class MPSKS_ClientForm(FlaskForm):
password = PasswordField(
label=lazy_gettext("Passwort"),
validators=[DataRequired(lazy_gettext("Passwort nicht angegeben!"))])
mac = StrippedStringField(
label=lazy_gettext("Neue MAC"),
validators=[DataRequired(lazy_gettext("MAC-Adresse nicht angegeben!")),
MacAddress(lazy_gettext("MAC ist nicht in gültigem Format!")),
require_unicast_mac],
description="XX:XX:XX:XX:XX:XX")
host_name = StringField(
label=lazy_gettext("Neuer Gerätename (Optional)"),
validators=[Regexp(regex="^[a-zA-Z0-9 ]+",
message=lazy_gettext("Gerätename ist ungültig")),
Optional(),
Length(-1, 30, lazy_gettext("Gerätename zu lang"))],
description=lazy_gettext("TL-WR841N, MacBook, FritzBox, PC, Laptop, o.Ä."),
)

class ActivateNetworkAccessForm(FlaskForm):
password = PasswordField(
label=lazy_gettext("Passwort"),
Expand Down

0 comments on commit 53bdda5

Please sign in to comment.