24 Commits

Author SHA1 Message Date
Dan Poltawski
528ed758e6 MDL-40267 forms: fix utf8 string length rules 2013-11-05 10:20:22 +08:00
Tim Lock
9c390d62ed MDL-41908 QuickForm: Fix PEAR Non-static method error 2013-10-01 09:53:26 +09:30
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
Davo Smith
9f9c794733 MDL-29147 Quickform fixed insertElementBefore to ignore duplicate unnamed elements 2012-02-27 20:05:39 +00: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
Marina Glancy
7b5702b681 MDL-19907 rewrote validation for required fields in forms, including support for editor field. Added parameter to use strict (no spaces) required fields validation 2011-07-29 13:51:26 +08:00
Petr Skoda
714dac9f7b MDL-24058 magic quotes are being delat with in our lib/setup.php, no need to use them again in our heavily hacked quickforms 2010-09-02 12:47:59 +00:00
Petr Skoda
c1c89e3b21 MDL-16780, MDL-24058 removing PHP4 JSON implementation and related AJAX pear stuff that is not used any more - it is buggy, so we would have to either fix it (waste of time) or we have to remove it; no core code is using this and contrib can be easily updated to use standard json_encode() 2010-09-02 12:27:47 +00:00
Petr Skoda
e56458a7c7 MDL-23486 fixed regression, sorrrrry 2010-07-24 19:19:37 +00:00
Petr Skoda
a5e94d4bb3 MDL-23486 ugly ugly ugly hack - hardcoded required text checking in editor element; we should realy create new forms engine in 2.1 :-( 2010-07-23 18:31:31 +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
66491cf130 MDL-19415 fixing deprecated use of contructors 2009-07-02 14:58:41 +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
nicolasconnault
1e074660da MDL-16780 Merging from MOODLE_19_STABLE 2008-10-03 07:13:16 +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