feriennet.forms.userprofile

Classes

UserProfileForm

Custom userprofile form for feriennet

Module Contents

class feriennet.forms.userprofile.UserProfileForm(formdata: MultiDict[str, Any] | None = None, obj: object | None = None, prefix: str = '', data: dict[str, Any] | None = None, meta: dict[str, Any] | None = None, *, extra_filters: Mapping[str, Sequence[Any]] | None = None, **kwargs: Any)[source]

Bases: onegov.form.Form

Custom userprofile form for feriennet

request: onegov.feriennet.request.FeriennetRequest[source]
extra_fields = ('salutation', 'organisation', 'address', 'zip_code', 'place', 'email', 'phone', 'website',...[source]
ticket_statistics[source]
salutation[source]
first_name[source]
last_name[source]
organisation[source]
address[source]
zip_code[source]
place[source]
political_municipality[source]
email[source]
phone[source]
emergency[source]
website[source]
bank_account[source]
bank_beneficiary[source]
property name: str[source]
on_request() None[source]
property show_political_municipality: bool | None[source]
toggle_political_municipality() None[source]
property show_ticket_statistics: bool[source]
toggle_ticket_statistics() None[source]
validate_emergency(field: wtforms.fields.StringField) None[source]
ensure_beneificary_if_bank_account() bool | None[source]
should_skip_key(key: str) bool[source]
populate_obj(model: onegov.user.User) None[source]

A reimplementation of wtforms populate_obj function with the addage of optional include/exclude filters.

If neither exclude nor include is passed, the function works like it does in wtforms. Otherwise fields are considered which are included but not excluded.

process_obj(model: onegov.user.User) None[source]

Called by process() if an object was passed.

Do not use this function directly. To process an object, you should call form.process(obj=obj) instead.