Add new public method `addFields()` to HTMLForm
authorDayllan Maza <dmaza@wikimedia.org>
Tue, 25 Jun 2019 16:02:33 +0000 (12:02 -0400)
committerDayllan Maza <dmaza@wikimedia.org>
Wed, 26 Jun 2019 20:29:41 +0000 (16:29 -0400)
commitf74b19134d0e7b810cead987f677bc553d8ee340
tree828f674f19afbebe0c545732648ebeb21d9c8517
parent67d01c452da591faced0a4be7940acf4f3292928
Add new public method `addFields()` to HTMLForm

Once you instantiate an HTMLForm there was no clear way of adding
new fields except for hidden fields. This is particularly problematic
when the form is passed by reference in Hooks.

NOTE: this is just moving what was previously part of the constructor
into its own method + very small tweaks

Change-Id: I23f983417510841ce76cdefcb076e5ab97b43f10
includes/htmlform/HTMLForm.php