mirror of
https://github.com/processwire/processwire.git
synced 2025-08-22 22:34:15 +02:00
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.
This commit is contained in:
@@ -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 .=
|
||||
"<p class='InputfieldPasswordRow'>" .
|
||||
"<label for='$this->id'>$newPassLabel</label>" .
|
||||
"<label for='$id'>$newPassLabel</label>" .
|
||||
"<input placeholder='$newPassLabel' " . $this->getAttributesString() . " /> " .
|
||||
"<span class='detail pass-scores' data-requirements='" . implode(' ', array_keys($requirements)) . "'>" .
|
||||
//"<span class='on'>$angleIcon$newPassLabel</span>" .
|
||||
@@ -235,9 +236,9 @@ class InputfieldPassword extends InputfieldText {
|
||||
"</span>" .
|
||||
"</p>" .
|
||||
"<p class='InputfieldPasswordRow'>" .
|
||||
"<label for='_$name'>$confirmLabel</label>" .
|
||||
"<label for='_$id'>$confirmLabel</label>" .
|
||||
"<input placeholder='$confirmLabel' class='InputfieldPasswordConfirm $inputClass' type='password' " .
|
||||
"size='$size' id='_$name' name='_$name' value='$confirmValue' autocomplete='new-password' /> " .
|
||||
"size='$size' id='_$id' name='_$name' value='$confirmValue' autocomplete='new-password' /> " .
|
||||
"<span class='pass-confirm detail'>" .
|
||||
//"<span class='confirm-pending on'>$angleIcon$newPassLabel ($confirmLabel)</span>" .
|
||||
"<span class='confirm-yes'>$goodIcon" . $this->_('Matches') . "</span>" .
|
||||
|
Reference in New Issue
Block a user