User tests: Successful: Unsuccessful:
Following #30437
Added a tooltip displaying the password minimum Requirements when registering in frontend
The new xml element is rules="true"
As I was at it I modified the tooltip display in Cassiopea as the default bootstrap white letters on black background was really ugly
This aspect can be modified by the people working on Cassiopea (if they prefer something else.)
Patch. Run npm ci
Define Password requirements in Users Options=>Tab Password Options
The password field does not indicate any requirements, forcing the new user to enter stuff and then modify depending on the Errors messages.
or if different requirements
If this accepted, we can implement in other core places.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Front End com_users Layout Libraries Templates (site) NPM Change |
@brianteeman
My intention was to modify the backend labels.
Integers
may not be and obvious word for many except developers/math people (anyway nobody is going to use figures like 1.5
...) but Digits
is fine in every language.
Length
is imprecise because it is a neutral term. We are speaking here of a number of Characters
. So, let's call it that way.
Also, if you look at the strings errors, they do use Digits and Characters
JFIELD_PASSWORD_NOT_ENOUGH_INTEGERS_N="Password does not have enough digits. At least %s digits are required."
JFIELD_PASSWORD_TOO_SHORT_N="Password is too short. Passwords must have at least %s characters."
etc.
Yes everything works, except with the @ which must not be a symbol ? But I am happy to discover this function which I did not know.
Please mark your test OK on issues.joomla.org
I have tested this item
Test ok
Would this be better without having to add the rule attribute and tooltip and fix the duplication?
if (!empty($description))
{
$requirements = [];
if ($minLength)
{
$requirements[] = Text::sprintf('JFIELD_PASSWORD_RULES_CHARACTERS', $minLength);
}
if ($minIntegers)
{
$requirements[] = Text::sprintf('JFIELD_PASSWORD_RULES_DIGITS', $minIntegers);
}
if ($minSymbols)
{
$requirements[] = Text::sprintf('JFIELD_PASSWORD_RULES_SYMBOLS', $minSymbols);
}
if ($minUppercase)
{
$requirements[] = Text::sprintf('JFIELD_PASSWORD_RULES_UPPERCASE', $minUppercase);
}
if ($minLowercase)
{
$requirements[] = Text::sprintf('JFIELD_PASSWORD_RULES_LOWERCASE', $minLowercase);
}
}
?>
<?php if (!empty($description)) : ?>
<div id="<?php echo $name . '-desc'; ?>" class="small text-muted">
<?php echo Text::sprintf($description, implode(', ', $requirements)); ?>
</div>
<?php endif; ?>
Add to registration.xml:
description="JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS"
Change:
JFIELD_PASSWORD_RULES_CHARACTERS="Characters: %d"
Add:
JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS="<strong>Minimum Requirements</strong> %s"
@infograf768 Great that you want to change both sets of strings to match
I would prefer the much simpler "numbers" to either "digits" or "integers"
@zero-24
I had figured you would have preferred such a display.
I already had done here a variation, keeping the rules attribute.
Will try your proposal. Evidently, it would imply modifying the J installation password tip as done in #30402 as I am not sure it will get the minimum characters
Will come back after tests.
I'm not sure whether that was for me but to answer your question when you can not get a value from the Database just fallback to the default values ;-)
My proposal would be to show all of that next the message that the PW does not meet the requirements. As all that info should be in JS anyway but that is beyond my knowledge of JS at that point :-D
But by Default it is only the 12 chars so the installer should be fine as it is and should only get the 'do not show the requiremets' xml switch so we do not dublicate that info.
I would prefer the much simpler "numbers" to either "digits" or "integers"
Not sure, digit is a single number. Number may be composed of one or multiple digits.
But by Default it is only the 12 chars so the installer should be fine as it is
I guess so but I also have to modify its description string, i.e. use the value of
description="JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS"
instead of the one of
description="INSTL_ADMIN_PASSWORD_LENGTH"
As I said, will first make a test and close this PR and create a new one.
I would prefer the much simpler "numbers" to either "digits" or "integers"
Not sure, digit is a single number. Number may be composed of one or multiple digits.
In English it is perfectly normal and expected to refer to numbers and letters in this use case
Oxford Dictionnary
https://www.lexico.com/definition/digit
Any of the numerals from 0 to 9, especially when forming part of a number.
I will stick to it.
A dictionary and real world usage are very different.
But as you always think you know better about a language that is not your native language just see what everyone else does.
Feel free to write what you want in the french translation but in this use case the correct english is "numbers"
In your list there are almost as many numbers of examples using number
than digit
It's not a good way to improve bad habits.
You will be free to change all if you desire in your own PR.
https://community.ui.com/questions/airControl-2-Password-Requirements/068eeb2e-6c6d-49b6-b7a2-81f9d61a9a34
https://en.wikipedia.org/wiki/Password_strength#/media/File:KeePass_random_password.png
https://i.dailymail.co.uk/i/pix/2017/05/08/23/401C689F00000578-0-image-m-70_1494282479950.jpg
So you found three bad examples to prove your incorrect point.
If google, facebook and twitter all use numbers thats good enough proof for me
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-25 09:06:16 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
?
NPM Resource Changed
?
|
Add a
description
attribute to the xml file to produce duplicateid
andaria-describedby
.