(bug 20136) Synchronize the protection form expiry boxes onchange in addition to...
authorAlex Z <mrzman@users.mediawiki.org>
Sun, 6 Sep 2009 04:10:26 +0000 (04:10 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Sun, 6 Sep 2009 04:10:26 +0000 (04:10 +0000)
Technically the onkeyup handler is redundant, but at least on Firefox, onchange doesn't run
until after the input loses focus, so its somewhat less intuitive, but necessary if the user
clicks an option from a browser's autosuggestion

RELEASE-NOTES
includes/ProtectionForm.php

index be44c5e..c55f7af 100644 (file)
@@ -462,6 +462,8 @@ this. Was used when mwEmbed was going to be an extension.
   the local wiki, the user is now treated as the local user
 * (bug 20494) OutputPage::getArticleBodyOnly() no longer requires an useless
   argument
+* (bug 20136) Protection form JavaScript now synchronizes the expiry boxes on
+  any change, in addition to onkeyup.
 
 == API changes in 1.16 ==
 
index 8c91544..3d88420 100644 (file)
@@ -375,7 +375,8 @@ class ProtectionForm {
                        }
                        # Add custom expiry field
                        $attribs = array( 'id' => "mwProtect-$action-expires",
-                               'onkeyup' => 'ProtectionForm.updateExpiry(this)' ) + $this->disabledAttrib;
+                               'onkeyup' => 'ProtectionForm.updateExpiry(this)',
+                               'onchange' => 'ProtectionForm.updateExpiry(this)' ) + $this->disabledAttrib;
                        $out .= "<table><tr>
                                        <td class='mw-label'>" .
                                                $mProtectother .