On submitted revdel form, prefill selected reason dropdown
authorAlex Monk <krenair@gmail.com>
Sun, 19 May 2013 14:26:44 +0000 (15:26 +0100)
committerAlex Monk <krenair@gmail.com>
Sun, 19 May 2013 14:28:31 +0000 (15:28 +0100)
When you submit a revdel form, the 'other/additional' reason will be in the
returned form. However, the common reason dropdown always defaults to 'none'.
This commit makes it use the previous common reason option.

Bug: 48508
Change-Id: I5b16aef33bdbabbc9608faac7f090f8dadcf79d4

includes/specials/SpecialRevisiondelete.php

index 9f4b9da..1e9adf5 100644 (file)
@@ -409,7 +409,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                                Xml::listDropDown( 'wpRevDeleteReasonList',
                                                        $this->msg( 'revdelete-reason-dropdown' )->inContentLanguage()->text(),
                                                        $this->msg( 'revdelete-reasonotherlist' )->inContentLanguage()->text(),
-                                                       '', 'wpReasonDropDown', 1
+                                                       $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' ), 'wpReasonDropDown', 1
                                                ) .
                                        '</td>' .
                                "</tr><tr>\n" .