Pronovix / password_enhancements

0 stars 3 forks source link

Remove `#size` settings as they are unneeded #29

Open boobaa opened 5 years ago

boobaa commented 5 years ago

And they're overridden anyway.

ycecube commented 5 years ago

Can you please show where it is being defined as 25 by default? I cannot find it in the code neither in the docs, even the example code in the Drupal\Core\Render\Element\PasswordConfirm class suggests that it needs to be defined.

Although the #size was set because that's how Drupal core defines it too.

boobaa commented 5 years ago

If you remove the #size lines, the password fields will have their size attributes set to 60: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21Password.php/function/Password%3A%3AgetInfo/8.7.x

Most themes will also apply a width rule via CSS anyway, which overrides the size attribute.

ycecube commented 5 years ago

Okay, but Drupal core sets the password_change field's #size to 25, that's why I want to follow the core functionality to be consistent with it. IOW I'm restoring the password_change field on the registration form that originally has it's #size set to 25, and on the password change form I'm following the same to be consistent.