From: Florian Date: Sat, 19 Dec 2015 23:02:04 +0000 (+0100) Subject: SpecialPageLanguage: Use title input (enable suggestions) and autofocus X-Git-Tag: 1.31.0-rc.0~8606 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=e1b4d4cf5bc6b8b607e2ae88db6641e8e0fe7cc0;p=lhc%2Fweb%2Fwiklou.git SpecialPageLanguage: Use title input (enable suggestions) and autofocus The title input field requires a valid title, so suggestions make sense to suggest possible existing pages to the user. Autofocus the input field, if the title is empty allows the user to type the title with less clicks. Bug: T120577 Change-Id: I8a75fdeccbe2be2144fcc15439ffefae1e89c6a9 --- diff --git a/includes/specials/SpecialPageLanguage.php b/includes/specials/SpecialPageLanguage.php index 02fca3aca5..93235514ca 100644 --- a/includes/specials/SpecialPageLanguage.php +++ b/includes/specials/SpecialPageLanguage.php @@ -48,9 +48,11 @@ class SpecialPageLanguage extends FormSpecialPage { $page = array(); $page['pagename'] = array( - 'type' => 'text', + 'type' => 'title', 'label-message' => 'pagelang-name', 'default' => $defaultName, + 'autofocus' => $defaultName === null, + 'exists' => true, ); // Options for whether to use the default language or select language