HTMLForm: Improve hidden field handling
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 9 Oct 2014 17:21:31 +0000 (13:21 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 9 Oct 2014 17:40:04 +0000 (13:40 -0400)
commit8a58e69b46a7add29dbe1a885306034bf3fd4d08
treee0ebe67c1f1e586fa2dbefc3ec5e2749a9efc610
parentccd051bc44974ba32749c845bf5d9aa0ca96aa24
HTMLForm: Improve hidden field handling

HTMLHiddenField is unable to output a non-default value, which makes it
unsuitable for actually persisting changes across multiple form
submissions. To preserve compatibility with forms that aren't expecting
persistence, fixing this requires a new parameter in the field
definition.

Also, due to the unusual way that hidden fields are added to the HTML
output, they are not being correctly handled by HTMLFormFieldCloner.
Special-case that.

Change-Id: I1fde7372401299b4432d28ac61982d47d5f3bbea
includes/htmlform/HTMLFormFieldCloner.php
includes/htmlform/HTMLHiddenField.php