summaryrefslogtreecommitdiff
path: root/skins/common/changepassword.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /skins/common/changepassword.js
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'skins/common/changepassword.js')
-rw-r--r--skins/common/changepassword.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/skins/common/changepassword.js b/skins/common/changepassword.js
new file mode 100644
index 00000000..1e3e2069
--- /dev/null
+++ b/skins/common/changepassword.js
@@ -0,0 +1,16 @@
+
+function onNameChange() {
+ if ( wgUserName != document.getElementById('wpName').value ) {
+ document.getElementById('wpPassword').disabled = true;
+ document.getElementById('wpComment').disabled = false;
+ } else {
+ document.getElementById('wpPassword').disabled = false;
+ document.getElementById('wpComment').disabled = true;
+ }
+}
+
+function onNameChangeHook() {
+ document.getElementById( 'wpName' ).onblur = onNameChange;
+}
+
+addOnloadHook( onNameChangeHook );