'id': this.options.id ? `widget.${this.options.id}` : null,
'name': this.options.name,
'type': 'text',
- 'class': `password-input ${this.options.password ? 'cbi-input-password' : 'cbi-input-text'}`,
+ 'class': this.options.password ? 'cbi-input-password' : 'cbi-input-text',
'readonly': this.options.readonly ? '' : null,
'disabled': this.options.disabled ? '' : null,
'maxlength': this.options.maxlength,
// DOM manipulation (e.g. by password managers) may have inserted other
// elements between the reveal button and the input. This searches for
// the first <input> inside the parent of the <button> to use for toggle.
- const e = this.parentElement.querySelector('input.password-input')
+ const e = this.parentElement.querySelector('input.cbi-input-password')
if (e) {
e.type = (e.type === 'password') ? 'text' : 'password';
} else {