]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16108 force autocomplete off for unmaskable password fields; merged from MOODLE_1...
authorskodak <skodak>
Mon, 18 Aug 2008 20:21:21 +0000 (20:21 +0000)
committerskodak <skodak>
Mon, 18 Aug 2008 20:21:21 +0000 (20:21 +0000)
lib/form/passwordunmask.php

index eb8cee941ffb1f485af5ef97579290f45046aa35..2b1ab6bb41487072b20cac85380603779a712582 100644 (file)
@@ -23,6 +23,7 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
             $unmaskjs = '<script type="text/javascript">
 //<![CDATA[
 document.write(\'<div class="unmask"><input id="'.$id.'unmask" value="1" type="checkbox" onclick="unmaskPassword(\\\''.$id.'\\\')"/><label for="'.$id.'unmask">'.addslashes_js($unmask).'<\/label><\/div>\');
+document.getElementById("'.$this->getAttribute('id').'").setAttribute("autocomplete", "off");
 //]]>
 </script>';
             return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />'.$unmaskjs;