feat: mixin for update forms
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.utils.text import gettext_lazy as _
|
||||
from django.contrib.auth.forms import PasswordChangeForm
|
||||
|
||||
from web.mixins import StylingMixin
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
|
||||
class ChangePasswordForm(StylingMixin, PasswordChangeForm):
|
||||
styled_fields = ("old_password", "new_password1", "new_password2")
|
||||
placeholder_for_field = {
|
||||
"old_password": _("********"),
|
||||
"new_password1": _("********"),
|
||||
"new_password2": _("********"),
|
||||
}
|
||||
Reference in New Issue
Block a user