Skip to content
Snippets Groups Projects
Commit 4cbbdb2d authored by Ben Mullins's avatar Ben Mullins
Browse files

Issue #3247994 by NickDickinsonWilde, diqidoq: Claro's password element...

Issue #3247994 by NickDickinsonWilde, diqidoq: Claro's password element handling invalid fails in some circumstances
parent 8a4928c1
No related branches found
No related tags found
No related merge requests found
......@@ -966,12 +966,12 @@ function claro_preprocess_form_element__password_confirm(&$variables) {
* Implements hook_preprocess_HOOK() for form_element__password.
*/
function claro_preprocess_form_element__password(&$variables) {
if (!empty($variables['element']['#array_parents']) && in_array('pass1', $variables['element']['#array_parents'])) {
if (!empty($variables['element']['#array_parents']) && in_array('pass1', $variables['element']['#array_parents'], TRUE)) {
// This is the main password form element.
$variables['attributes']['class'][] = 'password-confirm__password';
}
if (!empty($variables['element']['#array_parents']) && in_array('pass2', $variables['element']['#array_parents'])) {
if (!empty($variables['element']['#array_parents']) && in_array('pass2', $variables['element']['#array_parents'], TRUE)) {
// This is the password confirm form element.
$variables['attributes']['class'][] = 'password-confirm__confirm';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment