From 82641a5521c7f70b7cdc6be31046e39fb6dc64d2 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 8 Aug 2018 14:48:10 -0400 Subject: [PATCH] Add request processwire/processwire-issues#614 to make InputfieldPassword use version of id attribute for confirm input rather than name attribute, for cases where someone might want to have multiple password fields in the same document. --- .../InputfieldPassword/InputfieldPassword.module | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module b/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module index 64f3c526..43011082 100644 --- a/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module +++ b/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module @@ -205,6 +205,7 @@ class InputfieldPassword extends InputfieldText { $newPassLabel = $this->_('New password'); $confirmLabel = $this->_('Confirm'); $name = $this->attr('name'); + $id = $this->attr('id'); $size = $this->attr('size'); $out = ''; @@ -219,7 +220,7 @@ class InputfieldPassword extends InputfieldText { $out .= "

" . - "" . + "" . "getAttributesString() . " /> " . "" . //"$angleIcon$newPassLabel" . @@ -235,9 +236,9 @@ class InputfieldPassword extends InputfieldText { "" . "

" . "

" . - "" . + "" . " " . + "size='$size' id='_$id' name='_$name' value='$confirmValue' autocomplete='new-password' /> " . "" . //"$angleIcon$newPassLabel ($confirmLabel)" . "$goodIcon" . $this->_('Matches') . "" .