Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple password requirements indicator #2258

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions plugins/fabrik_element/password/forms/fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
<option value="1">JYES</option>
</field>

<field name="password_requirements_indicator"
type="radio"
class="btn-group"
default="0"
description="PLG_ELEMENT_PASSWORD_SHOW_REQUIREMENTS_DESC"
label="PLG_ELEMENT_PASSWORD_SHOW_REQUIREMENTS_LABEL">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field name="bootstrap_class"
type="bootstrapfieldclass"
default="input-medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ PLG_ELEMENT_PASSWORD_PASSWORD_CONFIRMATION_EMPTY_NOT_ALLOWED="Sie müssen ein Pa
; PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_LABEL="Show password strength"
; PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_DESC="If set to yes then the password will be checked against com_users' component options. Here you can for example set the number of integers or symbols required in the password"
; PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_LABEL="Joomla password validation"
; Password requirements check
PLG_ELEMENT_PASSWORD_MIN_LENGTH="Erforderliche Passwort Länge"
PLG_ELEMENT_PASSWORD_MIN_INTEGERS="Anzahl der Ziffern"
PLG_ELEMENT_PASSWORD_MIN_SYMBOLS="Anzahl der Sonderzeichen"
PLG_ELEMENT_PASSWORD_MIN_UPPERCASE="Grossbuchstaben"
PLG_ELEMENT_PASSWORD_MIN_LOWERCASE="Kleinbuchstaben"
PLG_ELEMENT_PASSWORD_ONE_OF="eines von"
PLG_ELEMENT_PASSWORD_MATCH="Die Passwörter stimmen überein"
PLG_ELEMENT_PASSWORD_DONT_MATCH="Die Passwörter stimmen nicht überein"

;Front end
PLG_ELEMENT_PASSWORD_VALIDATION_TIP="Geben Sie bitte ein Passwort ein und stellen Sie sicher, dass es mit dem Bestätigungsfeld übereinstimmt."
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_DESC="Should a meter be shown indicatin
PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_LABEL="Show password strength"
PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_DESC="If set to yes then the password will be checked against com_users' component options. Here you can for example set the number of integers or symbols required in the password"
PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_LABEL="Joomla password validation"
; Password requirements check
PLG_ELEMENT_PASSWORD_SHOW_REQUIREMENTS_DESC="Should a box be shown that indicates which Joomla password requirements are fulfilled"
PLG_ELEMENT_PASSWORD_SHOW_REQUIREMENTS_LABEL="Show Joomla password requirements"
PLG_ELEMENT_PASSWORD_MIN_LENGTH="Minimum password length"
PLG_ELEMENT_PASSWORD_MIN_INTEGERS="Number of digits"
PLG_ELEMENT_PASSWORD_MIN_SYMBOLS="Number of symbols"
PLG_ELEMENT_PASSWORD_MIN_UPPERCASE="Uppercase characters"
PLG_ELEMENT_PASSWORD_MIN_LOWERCASE="Lowercase characters"
PLG_ELEMENT_PASSWORD_ONE_OF="one of"
PLG_ELEMENT_PASSWORD_MATCH="Passwords match"
PLG_ELEMENT_PASSWORD_DONT_MATCH="Passwords don't match"

;Front end
PLG_ELEMENT_PASSWORD_VALIDATION_TIP="Please enter a password and ensure that the confirmation matches"
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
; Fabrik 3
; Copyright (C) 2005-2016 Media A-Team, Inc. - All rights reserved.
; License GNU/GPL http://www.gnu.org/copyleft/gpl.html
; Note : All ini files need to be saved as UTF-8 - No BOM

PLG_ELEMENT_PASSWORD_MAXLENGTH_LABEL="Longueur du champ"

PLG_ELEMENT_PASSWORD_STRONG="Solide"
PLG_ELEMENT_PASSWORD_MEDIUM="Moyen"
PLG_ELEMENT_PASSWORD_WEAK="Faible"
PLG_ELEMENT_PASSWORD_TYPE_PASSWORD="Tapez votre mot de passe"
PLG_ELEMENT_PASSWORD_MORE_CHARACTERS="Plus de caractères"
PLG_ELEMENT_PASSWORD_CONFIRM_PASSWORD="Confirmez le mot de passe"
PLG_ELEMENT_PASSWORD_PASSWORD_CONFIRMATION_DOES_NOT_MATCH="La confirmation du mot de passe ne correspond pas"
PLG_ELEMENT_PASSWORD_PASSWORD_CONFIRMATION_EMPTY_NOT_ALLOWED="Vous devez entrer un mot de passe"
PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_DESC="Une jauge doit-elle être affichée pour indiquer la force du mot de passe"
PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_LABEL="Montrer la force du mot de passe"
PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_DESC="Si réglé sur 'Oui', le mot de passe sera évalué selon les options du composant com_users. Dans ces optioons vous pouvez, par exemple, fixer le nombre d'entiers ou de symbôles requis dans le mot de passe"
PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_LABEL="Validation du mot de passe Joomla"

;Front end
PLG_ELEMENT_PASSWORD_VALIDATION_TIP="Veuillez taper un mot de passe et vérifier que la confirmation est la même"
; Fabrik 3
; Copyright (C) 2005-2016 Media A-Team, Inc. - All rights reserved.
; License GNU/GPL http://www.gnu.org/copyleft/gpl.html
; Note : All ini files need to be saved as UTF-8 - No BOM

PLG_ELEMENT_PASSWORD_MAXLENGTH_LABEL="Longueur du champ"

PLG_ELEMENT_PASSWORD_STRONG="Solide"
PLG_ELEMENT_PASSWORD_MEDIUM="Moyen"
PLG_ELEMENT_PASSWORD_WEAK="Faible"
PLG_ELEMENT_PASSWORD_TYPE_PASSWORD="Tapez votre mot de passe"
PLG_ELEMENT_PASSWORD_MORE_CHARACTERS="Plus de caractères"
PLG_ELEMENT_PASSWORD_CONFIRM_PASSWORD="Confirmez le mot de passe"
PLG_ELEMENT_PASSWORD_PASSWORD_CONFIRMATION_DOES_NOT_MATCH="La confirmation du mot de passe ne correspond pas"
PLG_ELEMENT_PASSWORD_PASSWORD_CONFIRMATION_EMPTY_NOT_ALLOWED="Vous devez entrer un mot de passe"
PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_DESC="Une jauge doit-elle être affichée pour indiquer la force du mot de passe"
PLG_ELEMENT_PASSWORD_SHOW_STRENGTH_METER_LABEL="Montrer la force du mot de passe"
PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_DESC="Si réglé sur 'Oui', le mot de passe sera évalué selon les options du composant com_users. Dans ces optioons vous pouvez, par exemple, fixer le nombre d'entiers ou de symbôles requis dans le mot de passe"
PLG_ELEMENT_PASSWORD_JRULE_VALIDATION_LABEL="Validation du mot de passe Joomla"
; Password requirements check
PLG_ELEMENT_PASSWORD_SHOW_REQUIREMENTS_DESC="Should a box be shown that indicates which Joomla password requirements are fulfilled"
PLG_ELEMENT_PASSWORD_SHOW_REQUIREMENTS_LABEL="Afficher les exigences relatives au mot de passe de Joomla"
PLG_ELEMENT_PASSWORD_MIN_LENGTH="Longueur minimale du mot de passe"
PLG_ELEMENT_PASSWORD_MIN_INTEGERS="Nombre de chiffres"
PLG_ELEMENT_PASSWORD_MIN_SYMBOLS="Nombre de symboles"
PLG_ELEMENT_PASSWORD_MIN_UPPERCASE="Caractères majuscules"
PLG_ELEMENT_PASSWORD_MIN_LOWERCASE="Caractères minuscules"
PLG_ELEMENT_PASSWORD_ONE_OF="un de"
PLG_ELEMENT_PASSWORD_MATCH="Les mots de passe correspondent"
PLG_ELEMENT_PASSWORD_DONT_MATCH="Les mots de passe ne correspondent pas"

;Front end
PLG_ELEMENT_PASSWORD_VALIDATION_TIP="Veuillez taper un mot de passe et vérifier que la confirmation est la même"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,38 @@
<?php
endif;
endif;

if ($d->showPasswordRequirements) :
?>
<div class="" id="pw-requirements-indicator" style="margin-left:6px; margin-bottom: 20px; font-size: 0.95em; <?php echo $d->extraStyle; ?>">

<span style="color: #DB1717;"><span class="icon-cancel-2"> </span>
<?php echo FText::_('PLG_ELEMENT_PASSWORD_MIN_LENGTH') . ": " . $d->passwordMinLength; ?>
</span><br/>

<span style="color: #DB1717;"><span class="icon-cancel-2"> </span>
<?php echo FText::_('PLG_ELEMENT_PASSWORD_MIN_INTEGERS') . ": " . $d->passwordMinIntegers; ?>
</span><br/>

<span style="color: #DB1717;"><span class="icon-cancel-2"> </span>
<?php echo FText::_('PLG_ELEMENT_PASSWORD_MIN_SYMBOLS') . ": " . $d->passwordMinSymbols . " (" . FText::_('PLG_ELEMENT_PASSWORD_ONE_OF') . ": @$!%*#?&)"; ?>
</span><br/>

<span style="color: #DB1717;"><span class="icon-cancel-2"> </span>
<?php echo FText::_('PLG_ELEMENT_PASSWORD_MIN_UPPERCASE') . ": " . $d->passwordMinUppercase; ?>
</span><br/>

<span style="color: #DB1717;"><span class="icon-cancel-2"> </span>
<?php echo FText::_('PLG_ELEMENT_PASSWORD_MIN_LOWERCASE') . ": " . $d->passwordMinLowercase; ?>
</span><br/>

<span style="color: #DB1717;"><span class="icon-cancel-2"> </span>
<?php echo FText::_('PLG_ELEMENT_PASSWORD_DONT_MATCH') ?>
</span>

</div>
<?php
endif;
?>

<input <?php echo $pw2Attributes; ?>" />
10 changes: 7 additions & 3 deletions plugins/fabrik_element/password/password-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading