Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Remove #size settings as they are unneeded #29

Open
boobaa opened this issue Jul 11, 2019 · 3 comments
Open

Remove #size settings as they are unneeded #29

boobaa opened this issue Jul 11, 2019 · 3 comments

Comments

@boobaa
Copy link
Contributor

boobaa commented Jul 11, 2019

And they're overridden anyway.

@ycecube
Copy link
Collaborator

ycecube commented Jul 22, 2019

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
Copy link
Contributor Author

boobaa commented Jul 22, 2019

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
Copy link
Collaborator

ycecube commented Jul 23, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants