HTMLForm: Refactor loading of modules required to infuse fields
authorBartosz Dziewoński <matma.rex@gmail.com>
Sun, 31 Jul 2016 14:56:23 +0000 (16:56 +0200)
committerJforrester <jforrester@wikimedia.org>
Mon, 22 Aug 2016 17:35:35 +0000 (17:35 +0000)
commit6a366c3300f4aed78f846c09468daea7591a3a40
tree2ec606352c9df18db7e6a92a96ed80262079a1a4
parentfba68fd23bb806adabcdefacd700cccb3b5751bb
HTMLForm: Refactor loading of modules required to infuse fields

Rather than have a master list in autoinfuse.js (duplicated in
hide-if.js), we put this information in each field class and put it
in the generated HTML as a separate 'data-' attribute. This also
allows new fields defined by extensions to be correctly autoinfused.

Change-Id: I3da75706209cbc16b19cc3f02b355e58ca75fec9
includes/htmlform/HTMLFormElement.php
includes/htmlform/HTMLFormField.php
includes/htmlform/fields/HTMLSelectNamespace.php
includes/htmlform/fields/HTMLTitleTextField.php
includes/htmlform/fields/HTMLUserTextField.php
resources/src/mediawiki/htmlform/autoinfuse.js
resources/src/mediawiki/htmlform/hide-if.js