Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Automatic linting

Github-actions21c277e31c79
diff --git a/wger/core/forms.py b/wger/core/forms.py
index eb8641ee1..801252a62 100644
--- a/wger/core/forms.py
+++ b/wger/core/forms.py
@@ -57,6 +57,7 @@ class PasswordInputWithToggle(PasswordInput):
"""
Custom PasswordInput widget with eye icon toggle functionality
"""
+
template_name = 'forms/password_with_toggle.html'
def __init__(self, attrs=None, render_value=False):
@@ -289,11 +290,11 @@ class RegistrationForm(UserCreationForm, UserEmailForm):
def __init__(self, *args, **kwargs):
super(RegistrationForm, self).__init__(*args, **kwargs)
-
+
# Apply custom password widgets
self.fields['password1'].widget = PasswordInputWithToggle()
self.fields['password2'].widget = PasswordInputWithToggle()
-
+
self.helper = FormHelper()
self.helper.form_class = 'wger-form'
self.helper.layout = Layout(
@@ -316,11 +317,11 @@ class RegistrationFormNoCaptcha(UserCreationForm, UserEmailForm):
def __init__(self, *args, **kwargs):
super(RegistrationFormNoCaptcha, self).__init__(*args, **kwargs)
-
+
# Apply custom password widgets
self.fields['password1'].widget = PasswordInputWithToggle()
self.fields['password2'].widget = PasswordInputWithToggle()
-
+
self.helper = FormHelper()
self.helper.form_class = 'wger-form'
self.helper.layout = Layout(
@@ -370,4 +371,4 @@ class FeedbackAnonymousForm(FeedbackRegisteredForm):
widget=ReCaptchaV3,
label='reCaptcha',
help_text=_('The form is secured with reCAPTCHA'),
- )
\ No newline at end of file
+ )