12 Commits

Author SHA1 Message Date
Sam Hemelryk
58b7d48f9a MDL-30974 forms: Last minute phpdoc fixes 2012-02-21 12:39:35 +13:00
Rajesh Taneja
6c1fd30484 MDL-30974 form: Checked and updated docblock for form library 2012-02-15 12:55:06 +08: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
7785dc2e9f lib, auth, webservice: MDL-20876 fix deprecated split() calls. 2010-07-20 01:38:54 +00:00
Petr Skoda
6fdbd16203 MDL-21767 fixed input validation 2010-03-07 14:58:19 +00:00
Petr Skoda
4bcc51185c MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions 2009-12-30 15:19:55 +00:00
Moodle HQ git importer
8926f8449f Fixing drift between CVS and git 2009-11-02 00:32:03 +00:00
Petr Skoda
4a0e2e632f MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:42:23 +00:00
skodak
bae2432219 MDL-19982 fixed notice if group empty; merged from MOODLE_19_STABLE 2009-08-02 11:37:37 +00:00
skodak
da40fd3218 MDL-19139 selectgroups formslib element improvements - 1/ does not validate if optgroup array empty 2/ add optional $showchoose parameter which adds "Choose..." as first item of list with empty value; merged from MOODLE_19_STABLE 2009-05-10 11:49:00 +00:00
jamiesensei
64360ee7b5 made hardFreeze work properly for a whole form. New paramater in moodleform constructor 'editable' defaults to true. If true then display form as normal. If false then hardFreeze whole form. Now displays form without an submit buttons. If form is hard frozen no data is ever passed to get_data. 2007-05-27 05:01:51 +00:00
jamiesensei
f161729e21 new element for formslib selectgroups is a select drop down with options grouped into optgroups 2007-05-20 11:48:02 +00:00