diff --git a/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module b/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module
index 1a49b56c..4a7d9753 100644
--- a/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module
+++ b/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module
@@ -3,7 +3,7 @@
/**
* An Inputfield for handling a password
*
- * ProcessWire 3.x, Copyright 2019 by Ryan Cramer
+ * ProcessWire 3.x, Copyright 2020 by Ryan Cramer
* https://processwire.com
*
* @property array $requirements Array of requirements (See require* constants)
@@ -13,6 +13,9 @@
* @property int $requireOld Require previous password? 0=Auto, 1=Yes, -1=No, Default=0 (Auto)
* @property bool $showPass Allow password to be rendered in renderValue and/or re-populated in form?
* @property string $defaultLabel Default label for field (default='Set Password'). Used when no 'label' has been set.
+ * @property string $oldPassLabel Label for old/current password placeholder.
+ * @property string $newPassLabel Label for new password placeholder.
+ * @property string $confirmLabel Label for password confirm placeholder.
*
*/
class InputfieldPassword extends InputfieldText {
@@ -111,6 +114,9 @@ class InputfieldPassword extends InputfieldText {
self::requireNone => $this->_('none (disable all above)'),
));
$this->set('showPass', false); // allow password to be rendered in renderValue and/or re-populated in form?
+ $this->set('oldPassLabel', $this->_('Current password'));
+ $this->set('newPassLabel', $this->_('New password'));
+ $this->set('confirmLabel', $this->_('Confirm'));
}
/**
@@ -164,7 +170,9 @@ class InputfieldPassword extends InputfieldText {
*
*/
public function ___render() {
-
+
+ /** @var Sanitizer $sanitizer */
+ $sanitizer = $this->wire('sanitizer');
$minlength = (int) $this->attr('minlength');
$requirements = array();
@@ -209,9 +217,9 @@ class InputfieldPassword extends InputfieldText {
$failIcon = "";
$okIcon = "";
$goodIcon = "";
- $oldPassLabel = $this->_('Current password');
- $newPassLabel = $this->_('New password');
- $confirmLabel = $this->_('Confirm');
+ $oldPassLabel = $sanitizer->entities1($this->oldPassLabel);
+ $newPassLabel = $sanitizer->entities1($this->newPassLabel);
+ $confirmLabel = $sanitizer->entities1($this->confirmLabel);
$name = $this->attr('name');
$id = $this->attr('id');
$size = $this->attr('size');