Commit Graph

26 Commits

Author SHA1 Message Date
Shamim Rezaie
706c5b3acd MDL-65506 forms: get the correct value for advcheckbox fields in js 2019-06-26 20:56:42 +10:00
Marina Glancy
f82c9d8d06 MDL-65217 form: option to randomise element ids 2019-04-29 14:23:27 +02:00
Jake Dallimore
c87010baca MDL-62947 core_form: fix remote code execution exploit in QuickForms
Applies the patch found upstream:
https://github.com/pear/HTML_QuickForm/commit/
d3a6d5c44dedf3c164c6c79198e4ef479bcedcd2 and make util methods static
for php7 compatibility.
2018-09-05 12:12:19 +08:00
Marina Glancy
e3e3e0abb7 MDL-60281 forms: PHP7.2 deprecations in PEAR 2017-10-16 09:37:20 +08:00
Rajesh Taneja
1ebda3eb8c MDL-50484 lib_formslib: Persistant input should have different id
Persistant input is appended for frozen elements
and should have different id then the actual element
2016-02-19 14:00:04 +08:00
David Monllao
3e51b0ad7e MDL-52826 forms: Using id attr
Switch from custom id references to the element's id attribute.

Extra fix to get rid of an unnecessary call to getValidationScript().
2016-01-29 10:15:25 +08:00
David Monllao
2edb12ec30 MDL-52826 forms: Move global functions to self-contained 2016-01-22 15:43:08 +08:00
Marina Glancy
32fada5cb2 MDL-52081 forms: indicate usage of grandparent constructor 2015-12-10 13:38:04 +08:00
Marina Glancy
1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Damyon Wiese
60a1ea56d9 MDL-51247 forms: All new aria-pimped autocomplete mform element.
Supports static list of options - or options fetched via ajax.
Has options for single,multi and tags support.
2015-10-14 16:22:44 +01:00
Brian Barnes
8b5f402151 MDL-46467 forms: Labels have "for" attribute even when frozen 2015-01-27 14:30:22 +13:00
Dan Poltawski
528ed758e6 MDL-40267 forms: fix utf8 string length rules 2013-11-05 10:20:22 +08:00
Petr Skoda
66b3302dec MDL-32405 workaround for non-static PEAR::raise_error() and fixed -1 debug support 2012-04-15 17:02:26 +02:00
Petr Skoda
68a7c9a696 MDL-32095 some more E_STRICT fixes 2012-03-26 11:47:15 +02:00
Petr Skoda
fabbf4398b MDL-32094 some nasty quickforms hacks that should help with E_STRICT
Note: we have stopped tracking our QuickForms hacks long ago.
2012-03-18 18:39:37 +01:00
Tim Hunt
3bbac90b2a MDL-31469 formslib: fix invalid for="" attributes on optional dates 2012-02-02 18:38:01 +00:00
Tim Hunt
820b41e34f MDL-30168 formslib: untangle automatic id generation.
Previously, we had overridden the _generateId method in almost all
subclasses; and then we mostly, but not always; ignored the value that
was generated there, and instead generated new (nicer) values in
MoodleQuickForm_Renderer::renderElement. Of course, that is not really a
logical place to (re)generate ids.

I have fixed the code so that the _generateId method now uses the 'nice
id' algorithm from renderElement. This should make the whole code flow
more logical.

This make all our overriding of _generateId unnecessary.

We do need a special _generateId for radio buttons, because you often
have different radio buttons with the same name but different values.

This change should only change the ids on radio, checkbox and
advcheckbox elements. Previously, those were essentially random, so I
don't think anyone could have been relying on the particular values.

This commit also has new unit tests, first to test the basic _generateId
algorithm, and then to create and render an example form (including some
tricky things like repeat_elements) and chech the acutal ids in the
generated HTML.
2011-12-23 11:51:45 +00:00
Jonathan Harker
fcbf4b6fac lib/pear MDL-20876 fix deprecated split() calls to use explode, str_split or preg_split
Author: Jonathan Harker <jonathan@catalyst.net.nz>
2010-07-20 01:16:55 +00:00
Petr Skoda
6d504dc07f MDL-19698 deprecated assign new by ref in QuickForms 2010-07-19 08:38:28 +00:00
skodak
49ba2b61b9 MDL-19030 even uglier hack - do not try to add id to labels of static element - they do not have it; merged from MOODLE_19_STABLE 2009-04-30 10:09:13 +00:00
skodak
5c89242e50 MDL-19030 very ugly hack - do not try to add id to labels of element group - they do not have it; merged from MOODLE_19_STABLE 2009-04-30 10:06:11 +00:00
skodak
8c453e41f7 MDL-19030 fixed xhtml strictness when label attached to frozen element; merged from MOODLE_19_STABLE 2009-04-30 09:50:02 +00:00
Martin Langhoff
08103c9364 cvsimport fixups 2007-07-07 14:18:30 +12:00
Martin Langhoff
f3f7610c90 cvsimport fixups -- cvshead had strayed from upstream 2007-01-04 13:15:04 +13:00
jamiesensei
f0e2d0ac80 upgraded tableless pear quickform packages 2006-09-27 16:31:11 +00:00
jamiesensei
da6f876395 This is a first cut of a new formslib.php a library of classes for creating and securely processing forms in Moodle, based on PEAR QuickForms. Only uses XHTML and CSS and no table tags.
This is NOT YET PART OF THE MOODLE API it is here for experimental purposes.
2006-09-24 17:04:51 +00:00