Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/form/password.php
Go to the documentation of this file.
00001 <?php
00002 require_once('HTML/QuickForm/password.php');
00003 
00010 class MoodleQuickForm_password extends HTML_QuickForm_password{
00016     var $_helpbutton='';
00017     function MoodleQuickForm_password($elementName=null, $elementLabel=null, $attributes=null) {
00018         global $CFG;
00019         if (empty($CFG->xmlstrictheaders)) {
00020             // no standard mform in moodle should allow autocomplete of passwords
00021             // this is valid attribute in html5, sorry, we have to ignore validation errors in legacy xhtml 1.0
00022             if (empty($attributes)) {
00023                 $attributes = array('autocomplete'=>'off');
00024             } else if (is_array($attributes)) {
00025                 $attributes['autocomplete'] = 'off';
00026             } else {
00027                 if (strpos($attributes, 'autocomplete') === false) {
00028                     $attributes .= ' autocomplete="off" ';
00029                 }
00030             }
00031         }
00032 
00033         parent::HTML_QuickForm_password($elementName, $elementLabel, $attributes);
00034     }
00042     function setHelpButton($helpbuttonargs, $function='helpbutton'){
00043         debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead');
00044     }
00051     function getHelpButton(){
00052         return $this->_helpbutton;
00053     }
00054 }
 All Data Structures Namespaces Files Functions Variables Enumerations