HTMLForm: Add "cloner" type
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 7 Mar 2014 16:03:32 +0000 (11:03 -0500)
committerOri.livneh <ori@wikimedia.org>
Fri, 2 May 2014 15:02:40 +0000 (15:02 +0000)
commite9d4d06276245ab4e4b3c8a256177e7b1a8afcc7
treeac49bbd0004864a0a65947a1c593d65711345b1c
parentc310e7b40c3b11b6e162c5e84acd638728a885f8
HTMLForm: Add "cloner" type

SecurePoll is going to need the ability to have a form for stuff like
"one or more admin usernames" and "one or more poll questions, each with
one or more options".

This change implements a generic field container that simply displays as
a <ul> followed by an "add more" button, with each <li> containing
various fields including a "remove" button.

Since this is only going to show up in SecurePoll to people creating a
poll (not to general users), the current design is functional but not
necessarily beautiful. Those interested in beauty are welcome to do so
in a followup change.

Change-Id: I46fad3971739ddc961259fe32eb6e1cd265a1c06
includes/AutoLoader.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/HTMLFormFieldCloner.php [new file with mode: 0644]
languages/i18n/en.json
languages/i18n/qqq.json
maintenance/language/messages.inc
resources/src/mediawiki/mediawiki.htmlform.js