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.
At the moment it is either difficult or impossible to modify some of the UI text that is highly visible to the end-user - the results of the AJAX constraints callback.
To edit this text you either need to mess with constraint plugins, or do a hack-job with t() against password_policy_ajax_check() strings.
If the results of the AJAX callback was a standard Drupal render array with a drupal_alter() call it would be much easier to tweak the UI text as appropriate.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2598714-7.patch | 1.96 KB | thedavidmeister |
#5 | 2598714-5.patch | 1.94 KB | thedavidmeister |
Comments
Comment #2
thedavidmeister CreditAttribution: thedavidmeister commentedPOC below:
Comment #3
thedavidmeister CreditAttribution: thedavidmeister commentedThis allows a bit more control over the scores too, which allows you to totally change the text if you wanted.
Comment #4
thedavidmeister CreditAttribution: thedavidmeister commentedYou could do something like this in an alter with the last set of code:
Comment #5
thedavidmeister CreditAttribution: thedavidmeister commentedComment #6
thedavidmeister CreditAttribution: thedavidmeister commentedComment #8
thedavidmeister CreditAttribution: thedavidmeister commented