Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
The table the is returned via _password_policy_constraints_table() gives a table of each constraint and its status:
It would be great if each row could have its own pass or fail class added so that this can be themed accordingly on the front end.
Cheers
Tom
Comment | File | Size | Author |
---|---|---|---|
#13 | password_policy_message-3.patch | 7.27 KB | Robert Castelo |
#11 | password_policy_message-2.patch | 7.29 KB | Robert Castelo |
#8 | password_policy_message.patch | 6.52 KB | Robert Castelo |
#5 | password-policy-status-theming-WIP.patch | 7.25 KB | mangy.fox |
| |||
#4 | table-row-classes-2940580.patch | 1.11 KB | blacklabel_tom |
|
Comments
Comment #2
blacklabel_tom CreditAttribution: blacklabel_tom at Reason Digital commentedComment #3
blacklabel_tom CreditAttribution: blacklabel_tom at Reason Digital commentedComment #4
blacklabel_tom CreditAttribution: blacklabel_tom at Reason Digital commentedComment #5
mangy.fox CreditAttribution: mangy.fox at Investis Digital commentedI've actually done some modifications so that the password status is properly themeable. I haven't had time to tidy it up and submit it yet, but you can have my WIP patch.
Comment #6
blacklabel_tom CreditAttribution: blacklabel_tom at Reason Digital commentedThanks Rob, I'll give it a bash!
Comment #7
Sophie.SKGonna go ahead and mark this as RTBC as we're using this patch on our site and have no problems with it :) Worth noting that Rob's patch goes above and beyond the original report from Tom.
Comment #8
Robert Castelo CreditAttribution: Robert Castelo commentedHere's a patch based on #5 for an alternative solution that might be closer to what most projects would want:
* Only displays fail message rows
* Only displays the actual fail message
Comment #10
mangy.fox CreditAttribution: mangy.fox at Investis Digital commentedThanks Robert Castelo. I'm not sure if this is the place to be deciding what most projects would want. Happy to hear people's opinions on whether this should be changed though.
The point of #5 was to make it easier for devs to change the output to whatever they wanted. I intentionally kept the default output the same as the existing code so that there were no unexpected changes for users/clients.
I also can't see the default template in your patch.
Comment #11
Robert Castelo CreditAttribution: Robert Castelo commentedSorry, ignore my patch in previous post, please try this one instead.
Comment #12
Robert Castelo CreditAttribution: Robert Castelo commented"I'm not sure if this is the place to be deciding what most projects would want."
Agreed - I'll rephrase my earlier comment to "for those looking for a more minimalist password message".
Comment #13
Robert Castelo CreditAttribution: Robert Castelo commentedNew patch that also changes messages header to "Password Security Requirements", and empty/passed message to "All requirements passed.".
Comment #14
mangy.fox CreditAttribution: mangy.fox at Investis Digital commentedClosing this as a duplicate of https://www.drupal.org/project/password_policy/issues/2858693 which is already fixed.
I will open a new issue for my theming changes.