forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-django-password-strength-kwargs.patch
More file actions
36 lines (29 loc) · 1.45 KB
/
fix-django-password-strength-kwargs.patch
File metadata and controls
36 lines (29 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- django_password_strength/widgets.py.orig 2020-06-24 16:07:28.479533134 +0200
+++ django_password_strength/widgets.py 2020-06-24 16:08:09.540714290 +0200
@@ -8,7 +8,7 @@
Form widget to show the user how strong his/her password is.
"""
- def render(self, name, value, attrs=None):
+ def render(self, name, value, **kwargs):
strength_markup = """
<div style="margin-top: 10px;">
<div class="progress" style="margin-bottom: 10px;">
@@ -30,7 +30,7 @@
except KeyError:
self.attrs['class'] = 'password_strength'
- return mark_safe( super(PasswordInput, self).render(name, value, attrs) + strength_markup )
+ return mark_safe( super(PasswordInput, self).render(name, value, **kwargs) + strength_markup )
class Media:
js = (
@@ -48,7 +48,7 @@
super(PasswordConfirmationInput, self).__init__(attrs, render_value)
self.confirm_with=confirm_with
- def render(self, name, value, attrs=None):
+ def render(self, name, value, **kwargs):
if self.confirm_with:
self.attrs['data-confirm-with'] = 'id_%s' % self.confirm_with
@@ -68,4 +68,4 @@
except KeyError:
self.attrs['class'] = 'password_confirmation'
- return mark_safe( super(PasswordInput, self).render(name, value, attrs) + confirmation_markup )
+ return mark_safe( super(PasswordInput, self).render(name, value, **kwargs) + confirmation_markup )