]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9652 rename new password reveal to unmask
authorskodak <skodak>
Mon, 30 Apr 2007 18:03:19 +0000 (18:03 +0000)
committerskodak <skodak>
Mon, 30 Apr 2007 18:03:19 +0000 (18:03 +0000)
13 files changed:
admin/settings/security.php
admin/settings/server.php
course/edit_form.php
group/edit_form.php
lang/en_utf8/form.php
lib/adminlib.php
lib/form/passwordunmask.php [moved from lib/form/passwordreveal.php with 54% similarity]
lib/formslib.php
lib/javascript-static.js
login/signup_form.php
mod/quiz/mod_form.php
theme/standard/styles_layout.css
user/editadvanced_form.php

index 739171b1cda9a526a859d2ea2c2e33a23302beac..8bf66af2a9e8c058f3157f4fc4de901cb7a8a08b 100644 (file)
@@ -39,7 +39,7 @@ $temp->add(new admin_setting_configselect('bloglevel', get_string('bloglevel', '
                                                                                                                                           0 => get_string('disableblogs','blog'))));
 
 $temp->add(new admin_setting_configcheckbox('cronclionly', get_string('cronclionly', 'admin'), get_string('configcronclionly', 'admin'), 0));
-$temp->add(new admin_setting_configpasswordreveal('cronremotepassword', get_string('cronremotepassword', 'admin'), get_string('configcronremotepassword', 'admin'), '', PARAM_RAW));
+$temp->add(new admin_setting_configpasswordunmask('cronremotepassword', get_string('cronremotepassword', 'admin'), get_string('configcronremotepassword', 'admin'), '', PARAM_RAW));
 
 $temp->add(new admin_setting_configcheckbox('passwordpolicy', get_string('passwordpolicy', 'admin'), get_string('configpasswordpolicy', 'admin'), 0));
 $temp->add(new admin_setting_configtext('minpasswordlength', get_string('minpasswordlength', 'admin'), get_string('configminpasswordlength', 'admin'), 8, PARAM_INT));
index e4126077dd0d5dec3dc3ca4d7404cdb218cf77ec..90b4ae7239af3aa4ff5b35e9b14a620dc5c25819 100644 (file)
@@ -19,7 +19,7 @@ $ADMIN->add('server', $temp, 0);
 $temp = new admin_settingpage('mail', get_string('mail','admin'));
 $temp->add(new admin_setting_configtext('smtphosts', get_string('smtphosts', 'admin'), get_string('configsmtphosts', 'admin'), '', PARAM_HOST));
 $temp->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
-$temp->add(new admin_setting_configpasswordreveal('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_RAW));
+$temp->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'admin'), get_string('configsmtpuser', 'admin'), '', PARAM_RAW));
 $temp->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'admin'), get_string('confignoreplyaddress', 'admin'), 'noreply@' . $_SERVER['HTTP_HOST'], PARAM_NOTAGS));
 $temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
 $temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
index dcb26578db25e09aea54e0dc1201c101d7168410..21ca8a92a7e6a3406ceca61c9c3faad990c93ee7 100644 (file)
@@ -277,7 +277,7 @@ class course_edit_form extends moodleform {
         $mform->setHelpButton('visible', array('courseavailability', get_string('availability')), true);
         $mform->setDefault('visible', 1);
 
-        $mform->addElement('passwordreveal', 'password', get_string('enrolmentkey'), 'size="25"');
+        $mform->addElement('passwordunmask', 'password', get_string('enrolmentkey'), 'size="25"');
         $mform->setHelpButton('password', array('enrolmentkey', get_string('enrolmentkey')), true);
         $mform->setDefault('password', '');
         $mform->setType('password', PARAM_RAW);
index 29626de4eb5faf64fe217ad1003512f4bf09591e..8e1a5a2e14a4910f28d5d7a915f7ffe6748c255c 100644 (file)
@@ -32,7 +32,7 @@ class group_edit_form extends moodleform {
         $mform->addElement('htmleditor', 'description', get_string('groupdescription', 'group'), array('rows'=> '15', 'course' => $courseid, 'cols'=>'45'));
         $mform->setType('description', PARAM_RAW);
         
-        $mform->addElement('passwordreveal', 'enrolmentkey', get_string('enrolmentkey', 'group'), 'maxlength="254" size="24"', get_string('enrolmentkey'));
+        $mform->addElement('passwordunmask', 'enrolmentkey', get_string('enrolmentkey', 'group'), 'maxlength="254" size="24"', get_string('enrolmentkey'));
         $mform->setHelpButton('enrolmentkey', array('groupenrolmentkey', get_string('enrolmentkey', 'group')), true);
         $mform->setType('enrolmentkey', PARAM_RAW);
         
index d90fab05de0e347dfdd13a71e4e0bfbdd6f7d1a4..85689674a6b5c281ec499231aa6054c9a1d3b94a 100644 (file)
@@ -16,7 +16,7 @@ $string['nonexistentformelements'] = 'Trying to add help buttons to nonexistent
 $string['requiredelement'] = 'Required field';
 $string['general'] = 'General';
 $string['optional'] = 'Optional';
-$string['revealpassword'] = 'Reveal';
+$string['unmaskpassword'] = 'Unmask';
 $string['modstandardels']='Common Module Settings';
 $string['miscellaneoussettings']='Miscellaneous Settings';
 $string['addfields']='Add $a fields to form';
index 49fe2f866e048ea1e44cdda1f972af5d93bb7e16..5cef9f04e1c93cfdc49ef95f670253b48d83d336 100644 (file)
@@ -1426,9 +1426,9 @@ class admin_setting_configtext extends admin_setting {
 
 }
 
-class admin_setting_configpasswordreveal extends admin_setting_configtext {
+class admin_setting_configpasswordunmask extends admin_setting_configtext {
 
-    function admin_setting_configpasswordreveal($name, $visiblename, $description, $defaultsetting, $paramtype=PARAM_RAW) {
+    function admin_setting_configpasswordunmask($name, $visiblename, $description, $defaultsetting, $paramtype=PARAM_RAW) {
         parent::admin_setting_configtext($name, $visiblename, $description, $defaultsetting, $paramtype);
     }
 
@@ -1439,14 +1439,14 @@ class admin_setting_configpasswordreveal extends admin_setting_configtext {
             $current = $this->get_setting();
         }
             $id = 'id_s_'.$this->name;
-            $reveal = get_string('revealpassword', 'form');
-            $revealjs = '<script type="text/javascript">
+            $unmask = get_string('unmaskpassword', 'form');
+            $unmaskjs = '<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.write(\'<div class="unmask"><input id="'.$id.'unmask" value="1" type="checkbox" onclick="unmaskPassword(\\\''.$id.'\\\')"/><label for="'.$id.'unmask">'.addslashes_js($unmask).'<\/label><\/div>\');
 //]]>
 </script>';
         return format_admin_setting($this->name, $this->visiblename,
-                '<input type="password" class="form-text" id="id_s_'.$this->name.'" name="s_'.$this->name.'" value="'.s($current).'" />'.$revealjs,
+                '<input type="password" class="form-text" id="id_s_'.$this->name.'" name="s_'.$this->name.'" value="'.s($current).'" />'.$unmaskjs,
                 $this->description);
     }
     
similarity index 54%
rename from lib/form/passwordreveal.php
rename to lib/form/passwordunmask.php
index dcdda8f2cd569b55d9646b7afe6b8e760bcd1053..eb8cee941ffb1f485af5ef97579290f45046aa35 100644 (file)
@@ -7,25 +7,25 @@ global $CFG;
 require_once($CFG->libdir.'/form/password.php');
 
 /**
- * HTML class for a password type element with reveal option
+ * HTML class for a password type element with unmask option
  *
  * @author       Petr Skoda
  * @access       public
  */
-class MoodleQuickForm_passwordreveal extends MoodleQuickForm_password {
+class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
 
     function toHtml() {
         if ($this->_flagFrozen) {
             return $this->getFrozenHtml();
         } else {
             $id = $this->getAttribute('id');
-            $reveal = get_string('revealpassword', 'form');
-            $revealjs = '<script type="text/javascript">
+            $unmask = get_string('unmaskpassword', 'form');
+            $unmaskjs = '<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.write(\'<div class="unmask"><input id="'.$id.'unmask" value="1" type="checkbox" onclick="unmaskPassword(\\\''.$id.'\\\')"/><label for="'.$id.'unmask">'.addslashes_js($unmask).'<\/label><\/div>\');
 //]]>
 </script>';
-            return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />'.$revealjs;
+            return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />'.$unmaskjs;
         }
     } //end func toHtml
 
index 603cfb725ccfd21aa2e36e3f56945b57c7dd18b4..fc7e7873fbf3b4dc49ed4c97d304ce60442af979 100644 (file)
@@ -1590,7 +1590,7 @@ MoodleQuickForm::registerElementType('checkbox', "$CFG->libdir/form/checkbox.php
 MoodleQuickForm::registerElementType('file', "$CFG->libdir/form/file.php", 'MoodleQuickForm_file');
 MoodleQuickForm::registerElementType('group', "$CFG->libdir/form/group.php", 'MoodleQuickForm_group');
 MoodleQuickForm::registerElementType('password', "$CFG->libdir/form/password.php", 'MoodleQuickForm_password');
-MoodleQuickForm::registerElementType('passwordreveal', "$CFG->libdir/form/passwordreveal.php", 'MoodleQuickForm_passwordreveal');
+MoodleQuickForm::registerElementType('passwordunmask', "$CFG->libdir/form/passwordunmask.php", 'MoodleQuickForm_passwordunmask');
 MoodleQuickForm::registerElementType('radio', "$CFG->libdir/form/radio.php", 'MoodleQuickForm_radio');
 MoodleQuickForm::registerElementType('select', "$CFG->libdir/form/select.php", 'MoodleQuickForm_select');
 MoodleQuickForm::registerElementType('text', "$CFG->libdir/form/text.php", 'MoodleQuickForm_text');
index 2c38185fb47fe4868a9b486cfecb107ba31894ad..5e128e247443b12910e2f7eb8df317f840c5efc2 100644 (file)
@@ -280,9 +280,9 @@ function showAdvancedOnClick(button, hidetext, showtext){
     return false;
 }
 
-function revealPassword(id) {
+function unmaskPassword(id) {
   var pw = document.getElementById(id);
-  var chb = document.getElementById(id+'reveal');
+  var chb = document.getElementById(id+'unmask');
 
   try {
     // first try IE way - it can not set name attribute later
index c8b9e80b19e97dba5b55e8ac79ec3e3f5c8ae538..51508d89297e13d199aec160c48d3111089fa9ed 100644 (file)
@@ -15,7 +15,7 @@ class login_signup_form extends moodleform {
         $mform->setType('username', PARAM_NOTAGS);
         $mform->addRule('username', get_string('missingusername'), 'required', null, 'server');
 
-        $mform->addElement('passwordreveal', 'password', get_string('password'), 'maxlength="32" size="12"');
+        $mform->addElement('passwordunmask', 'password', get_string('password'), 'maxlength="32" size="12"');
         $mform->setType('password', PARAM_RAW);
         $mform->addRule('password', get_string('missingpassword'), 'required', null, 'server');
 
index a7122f9cd7db94da8d6890ed342d0210058d6c1c..3018362e9be46c7b61485474977bf17518793740 100644 (file)
@@ -191,7 +191,7 @@ class mod_quiz_mod_form extends moodleform_mod {
                $mform->setAdvanced('popup', $CFG->quiz_fix_popup);
         $mform->setDefault('popup', $CFG->quiz_popup);
 
-        $mform->addElement('passwordreveal', 'quizpassword', get_string("requirepassword", "quiz"));
+        $mform->addElement('passwordunmask', 'quizpassword', get_string("requirepassword", "quiz"));
                $mform->setType('quizpassword', PARAM_TEXT);
                $mform->setHelpButton('quizpassword', array("requirepassword", get_string("requirepassword", "quiz"), "quiz"));
                $mform->setAdvanced('quizpassword', $CFG->quiz_fix_password);
index 301396627bb6f5d1bad5db0220bb69875002eca1..fc6780f7a84f56bfdcddcca6932d0217e4737615 100644 (file)
@@ -553,10 +553,10 @@ form.mform div.error,form.mform fieldset.error {
 form.mform .fcheckbox input {
   margin-left: 0px;
 }
-form.mform .fpassword .reveal {
+form.mform .fpassword .unmask {
   display:inline;
 }
-form.mform .fpassword .reveal input {
+form.mform .fpassword .unmask input {
   margin-left:5px;
   margin-right:3px;
 }
@@ -995,12 +995,12 @@ body#admin-modules table.generaltable td.c0
   padding: 0.3em 0 1.5em 0;
 }
 
-#adminsettings .form-item .reveal input {
+#adminsettings .form-item .unmask input {
   margin-left:5px;
   margin-right:3px;
 }
 
-#adminsettings .form-item .reveal label {
+#adminsettings .form-item .unmask label {
   width: auto;
   text-align: left;
 }
index 7165ea8d29194c2976cb322f89ec94847e0456ba..3cd636d83b4509f025374851e6411f2927ea715d 100644 (file)
@@ -32,7 +32,7 @@ class user_editadvanced_form extends moodleform {
         $mform->setHelpButton('auth', array('authchange', get_string('chooseauthmethod','auth')));
         $mform->setAdvanced('auth');
 
-        $mform->addElement('passwordreveal', 'newpassword', get_string('newpassword'), 'size="20"');
+        $mform->addElement('passwordunmask', 'newpassword', get_string('newpassword'), 'size="20"');
         $mform->setType('newpassword', PARAM_RAW);
         //TODO: add missing help - empty means no change