Projet

Général

Profil

0001-forms-mark-fields-expecting-a-new-password-26385.patch

Frédéric Péters, 17 août 2019 12:00

Télécharger (1,35 ko)

Voir les différences:

Subject: [PATCH] forms: mark fields expecting a new password (#26385)

 src/authentic2/forms/widgets.py | 6 ++++++
 1 file changed, 6 insertions(+)
src/authentic2/forms/widgets.py
238 238

  
239 239
class NewPasswordInput(PasswordInput):
240 240
    def render(self, name, value, attrs=None):
241
        if attrs is None:
242
            attrs = {}
243
        attrs['autocomplete'] = 'new-password'
241 244
        output = super(NewPasswordInput, self).render(name, value, attrs=attrs)
242 245
        if attrs:
243 246
            _id = attrs.get('id')
......
250 253
    # this widget must be named xxx2 and the other widget xxx1, it's a
251 254
    # convention, js code expect it.
252 255
    def render(self, name, value, attrs=None):
256
        if attrs is None:
257
            attrs = {}
258
        attrs['autocomplete'] = 'new-password'
253 259
        output = super(CheckPasswordInput, self).render(name, value, attrs=attrs)
254 260
        if attrs:
255 261
            _id = attrs.get('id')
256
-