From e1b4d4cf5bc6b8b607e2ae88db6641e8e0fe7cc0 Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 20 Dec 2015 00:02:04 +0100 Subject: [PATCH] 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 --- includes/specials/SpecialPageLanguage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.20.1