Permalink
Browse files

MDL-16108 force autocomplete off for unmaskable password fields

  • Loading branch information...
1 parent 8c4f5bc commit 1f56978e1a079b812ded563a3a8199df90862812 skodak committed Aug 18, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/form/passwordreveal.php
@@ -23,6 +23,7 @@ function toHtml() {
$revealjs = '<script type="text/javascript">
//<![CDATA[
document.write(\'<div class="reveal"><input id="'.$id.'reveal" value="1" type="checkbox" onclick="revealPassword(\\\''.$id.'\\\')"/><label for="'.$id.'reveal">'.addslashes_js($reveal).'<\/label><\/div>\');
+document.getElementById("'.$this->getAttribute('id').'").setAttribute("autocomplete", "off");
//]]>
</script>';
return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />'.$revealjs;

0 comments on commit 1f56978

Please sign in to comment.