Add flag to HTMLTextField to not persist submitted data
authorGergő Tisza <tgr.huwiki@gmail.com>
Fri, 1 Apr 2016 11:54:15 +0000 (14:54 +0300)
committerGergő Tisza <tgr.huwiki@gmail.com>
Fri, 1 Apr 2016 12:14:58 +0000 (15:14 +0300)
commitda1e91e84269a034ac2d3d48f0016718e2150ab7
tree1163742bee3bcf54ea35a63c9ca06071cc849180
parent718f3f78b583a473035f39a8c46e0a9829d2e0bf
Add flag to HTMLTextField to not persist submitted data

Sometimes the submitted text is not expected to show up as default
when the form is redisplayed after an error; password fields are
the obvious example for this, but in some cases (e.g. two-factor
token) it is useful for a normal text field to act like that as well.

The patch adds a new 'persistent' flag to HTMLTextField, which
defaults to false for passwords and true otherwise.

Change-Id: If0a52f61aa061bbb55bfdc76321ace7d3eaed934
includes/htmlform/HTMLTextField.php