|
| 1 | +--- django_password_strength/widgets.py.orig 2020-06-24 16:07:28.479533134 +0200 |
| 2 | ++++ django_password_strength/widgets.py 2020-06-24 16:08:09.540714290 +0200 |
| 3 | +@@ -8,7 +8,7 @@ |
| 4 | + Form widget to show the user how strong his/her password is. |
| 5 | + """ |
| 6 | + |
| 7 | +- def render(self, name, value, attrs=None): |
| 8 | ++ def render(self, name, value, **kwargs): |
| 9 | + strength_markup = """ |
| 10 | + <div style="margin-top: 10px;"> |
| 11 | + <div class="progress" style="margin-bottom: 10px;"> |
| 12 | +@@ -30,7 +30,7 @@ |
| 13 | + except KeyError: |
| 14 | + self.attrs['class'] = 'password_strength' |
| 15 | + |
| 16 | +- return mark_safe( super(PasswordInput, self).render(name, value, attrs) + strength_markup ) |
| 17 | ++ return mark_safe( super(PasswordInput, self).render(name, value, **kwargs) + strength_markup ) |
| 18 | + |
| 19 | + class Media: |
| 20 | + js = ( |
| 21 | +@@ -48,7 +48,7 @@ |
| 22 | + super(PasswordConfirmationInput, self).__init__(attrs, render_value) |
| 23 | + self.confirm_with=confirm_with |
| 24 | + |
| 25 | +- def render(self, name, value, attrs=None): |
| 26 | ++ def render(self, name, value, **kwargs): |
| 27 | + if self.confirm_with: |
| 28 | + self.attrs['data-confirm-with'] = 'id_%s' % self.confirm_with |
| 29 | + |
| 30 | +@@ -68,4 +68,4 @@ |
| 31 | + except KeyError: |
| 32 | + self.attrs['class'] = 'password_confirmation' |
| 33 | + |
| 34 | +- return mark_safe( super(PasswordInput, self).render(name, value, attrs) + confirmation_markup ) |
| 35 | ++ return mark_safe( super(PasswordInput, self).render(name, value, **kwargs) + confirmation_markup ) |
| 36 | + |
0 commit comments