15 Commits

Author SHA1 Message Date
Rajesh Taneja
c277b502ab MDL-31294 Forms Library: Removed deprecated functions from forms library 2012-07-24 15:09:39 +08: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
Rod Norfor
1e668c4d85 MDL-13983 show frozen radio buttons in a more accessible way. 2011-03-09 16:26:37 +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
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
3e8b394e08 MDL-19416 fixed PHP 5.3 compatiblity issue - fixes weird use of constructors in quickforms 2009-06-07 09:43:27 +00:00
tjhunt
a2cd1ed6ff MDL-10626 - Change HTML of checkboxes etc., to make it easier to style forms 2007-07-27 11:05:34 +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
86aab05ced fix for xhtml probs MDL-8102 and MDL-7979 - invalid id attributes.
and stopped using label tag for a group of elements where the label refers to the group of elements and not an individual one.
2007-01-08 15:53:17 +00:00
jamiesensei
5ce73257ab some bug fixes in setHelpButton internals.
added new editorhelpbutton function that can be used to refer to several help topics.
2007-01-04 10:23:06 +00:00
jamiesensei
d4fe14d3e4 some changes to setHelpButton methods on elements and MoodleQuickForm to allow non standard help buttons such as the grades pop up window. 2006-11-13 07:43:22 +00:00
skodak
7f40a229a4 New version of formslib.php (see MDL-6914 for more details), course/edit2.php is disabled for now - working on edit3.php ;-)
More inline comments/docs today.
2006-10-12 07:33:57 +00:00
jamiesensei
ec929cd596 now wrapping a group element in a fieldset tag, brought id tag on checkboxes and radio boxes in line with moodle universal form structure 2006-09-28 04:18:35 +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