snapshot: preserve session hardening and account surface
This commit is contained in:
@@ -2,7 +2,7 @@ from django import forms
|
||||
from pathlib import Path
|
||||
from datetime import timedelta
|
||||
from django.contrib.auth import get_user_model, password_validation
|
||||
from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm, SetPasswordForm
|
||||
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import get_language, gettext as _, gettext_lazy
|
||||
|
||||
@@ -123,6 +123,25 @@ class AppSetPasswordForm(SetPasswordForm):
|
||||
)
|
||||
|
||||
|
||||
class AppPasswordChangeForm(PasswordChangeForm):
|
||||
old_password = forms.CharField(
|
||||
label=gettext_lazy('Aktuelles Passwort'),
|
||||
strip=False,
|
||||
widget=forms.PasswordInput(attrs={'autocomplete': 'current-password'}),
|
||||
)
|
||||
new_password1 = forms.CharField(
|
||||
label=gettext_lazy('Neues Passwort'),
|
||||
strip=False,
|
||||
widget=forms.PasswordInput(attrs={'autocomplete': 'new-password'}),
|
||||
help_text=password_validation.password_validators_help_text_html(),
|
||||
)
|
||||
new_password2 = forms.CharField(
|
||||
label=gettext_lazy('Neues Passwort bestätigen'),
|
||||
strip=False,
|
||||
widget=forms.PasswordInput(attrs={'autocomplete': 'new-password'}),
|
||||
)
|
||||
|
||||
|
||||
class UserManagementCreateForm(forms.Form):
|
||||
first_name = forms.CharField(label=_('Vorname'), max_length=150, required=False)
|
||||
last_name = forms.CharField(label=_('Nachname'), max_length=150, required=False)
|
||||
@@ -385,7 +404,7 @@ class OnboardingRequestForm(forms.ModelForm):
|
||||
widget=forms.CheckboxSelectMultiple,
|
||||
)
|
||||
phone_number_choice = forms.CharField(
|
||||
label='TUB/CO-Telefon-Direktwahl-Nr. 030 447202 (10-89)',
|
||||
label='Telefon-Direktwahl',
|
||||
required=False,
|
||||
widget=forms.TextInput(attrs={'placeholder': 'z. B. 030 44720212'}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user