예제 #1
0
 /**
  * constructor
  *
  * @param string $elementName (optional) name of the password element
  * @param string $elementLabel (optional) label for password element
  * @param mixed $attributes (optional) Either a typical HTML attribute string
  *              or an associative array
  */
 function MoodleQuickForm_password($elementName = null, $elementLabel = null, $attributes = null)
 {
     global $CFG;
     // no standard mform in moodle should allow autocomplete of passwords
     if (empty($attributes)) {
         $attributes = array('autocomplete' => 'off');
     } else {
         if (is_array($attributes)) {
             $attributes['autocomplete'] = 'off';
         } else {
             if (strpos($attributes, 'autocomplete') === false) {
                 $attributes .= ' autocomplete="off" ';
             }
         }
     }
     parent::HTML_QuickForm_password($elementName, $elementLabel, $attributes);
 }
예제 #2
0
 /**
  * constructor
  *
  * @param string $elementName (optional) name of the password element
  * @param string $elementLabel (optional) label for password element
  * @param mixed $attributes (optional) Either a typical HTML attribute string
  *              or an associative array
  */
 function MoodleQuickForm_password($elementName = null, $elementLabel = null, $attributes = null)
 {
     global $CFG;
     if (empty($CFG->xmlstrictheaders)) {
         // no standard mform in moodle should allow autocomplete of passwords
         // this is valid attribute in html5, sorry, we have to ignore validation errors in legacy xhtml 1.0
         if (empty($attributes)) {
             $attributes = array('autocomplete' => 'off');
         } else {
             if (is_array($attributes)) {
                 $attributes['autocomplete'] = 'off';
             } else {
                 if (strpos($attributes, 'autocomplete') === false) {
                     $attributes .= ' autocomplete="off" ';
                 }
             }
         }
     }
     parent::HTML_QuickForm_password($elementName, $elementLabel, $attributes);
 }
예제 #3
0
 function MoodleQuickForm_password($elementName = null, $elementLabel = null, $attributes = null)
 {
     parent::HTML_QuickForm_password($elementName, $elementLabel, $attributes);
 }