Forms
hypha.apply.users.forms
¶
CustomAuthenticationForm
¶
Bases: AuthenticationForm
Form to collect the email and password for login.
Add "Remember me" checkbox that extends session time.
Adds login extra text and user content to the form, if configured in the wagtail auth settings.
Source code in hypha/apply/users/forms.py
remember_me
class-attribute
instance-attribute
¶
remember_me = BooleanField(label=gettext_lazy('Remember me'), help_text=gettext_lazy('On trusted devices only, keeps you logged in for a longer period.'), required=False, widget=CheckboxInput())
PasswordlessAuthForm
¶
Bases: Form
Form to collect the email for passwordless login or signup (if enabled).
Adds login extra text and user content to the form, if configured in the wagtail auth settings.
Source code in hypha/apply/users/forms.py
email
class-attribute
instance-attribute
¶
email = EmailField(label=gettext_lazy('Email address'), required=True, max_length=254, widget=EmailInput(attrs={'autofocus': True, 'autocomplete': 'email'}))
remember_me
class-attribute
instance-attribute
¶
remember_me = BooleanField(label=gettext_lazy('Remember me'), help_text=gettext_lazy('On trusted devices only, keeps you logged in for a longer period.'), required=False, widget=CheckboxInput())
CustomUserAdminFormBase
¶
Source code in hypha/apply/users/forms.py
error_messages
class-attribute
instance-attribute
¶
error_messages = {'duplicate_username': gettext_lazy('A user with that email already exists.'), 'password_mismatch': gettext_lazy("The two password fields didn't match.")}
GroupsModelMultipleChoiceField
¶
Bases: ModelMultipleChoiceField
A custom ModelMultipleChoiceField utilized to provide a custom label for the group prompts
get_group_mmcf
classmethod
¶
Source code in hypha/apply/users/forms.py
label_from_instance
¶
Overwriting ModelMultipleChoiceField's label from instance to provide help_text (if it exists)
Source code in hypha/apply/users/forms.py
CustomUserEditForm
¶
Bases: CustomUserAdminFormBase
, UserEditForm
A custom UserEditForm used to provide custom fields (ie. custom group fields)
Source code in hypha/apply/users/forms.py
error_messages
class-attribute
instance-attribute
¶
error_messages = {'duplicate_username': gettext_lazy('A user with that email already exists.'), 'password_mismatch': gettext_lazy("The two password fields didn't match.")}
CustomUserCreationForm
¶
Bases: CustomUserAdminFormBase
, UserCreationForm
Source code in hypha/apply/users/forms.py
error_messages
class-attribute
instance-attribute
¶
error_messages = {'duplicate_username': gettext_lazy('A user with that email already exists.'), 'password_mismatch': gettext_lazy("The two password fields didn't match.")}
ProfileForm
¶
Bases: ModelForm
Source code in hypha/apply/users/forms.py
BecomeUserForm
¶
Bases: Form
user_pk
class-attribute
instance-attribute
¶
user_pk = ModelChoiceField(widget=Select2Widget, help_text=gettext_lazy('Only includes active, non-superusers'), queryset=filter(is_active=True, is_superuser=False), label='', required=False)
EmailChangePasswordForm
¶
Bases: Form