HTMLForm: Use <button> and allow differing label and value
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 15 Dec 2015 22:12:34 +0000 (17:12 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 18 Dec 2015 17:41:55 +0000 (12:41 -0500)
commitd949901f3cc991d41d10eb2b2dcf62a46c1ff6bd
treeaa0f3ed9f4ace5b290372b5771c073568b7e8ffc
parent085cae20a4dc822a4800d7f3191e839bc70d2797
HTMLForm: Use <button> and allow differing label and value

Submit buttons, whether via HTMLForm::addButton() or HTMLSubmitField,
are difficult to use effectively when the submitted value has to match
the internationalized display label. HTML5 (and HTML4 for that matter)
already has <button> that does what we need, we just need to actually
use it.

But for IE6 and IE7, we can't use <button> because the browser doesn't
handle them correctly. Sniff those browsers to avoid their bugginess
(which the OOUI version should have been doing already for IE6, but
wasn't).

Bug: T121584
Change-Id: I7e15331efb162275c4116bcae61f19d6b884cbe3
includes/htmlform/HTMLButtonField.php
includes/htmlform/HTMLForm.php
includes/htmlform/OOUIHTMLForm.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialUpload.php