Ruslan Kabalin a4067bfc48 MDL-30637 Simplify moodle forms
Make the forms easier to use and navigate by adding functionality to
collapse and extend form sections (headers). The logic is as follows:

If form contains 2 and less sections (headers):

* Display the form as non-collapsible at all.
* The point above can be overridden if developer marks the section as expanded
  in form definition (e.g. $mform->setExpanded('foo'));

If form contains 3 and more sections (headers):

* always expanding the first section and closing all others by default;
* always expanding a section containing at least one "required" element;
* expanding any section which contains validation errors after submission;
* expanding any section which was previously open on previous submit (e.g. when
  adding new choices);
* expanding the section which is marked as expanded in form definition (e.g.
  $mform->setExpanded('foo');
2013-02-07 14:13:36 +00:00
..
2012-09-03 18:49:53 +02:00
2013-02-07 14:13:36 +00:00
2013-01-11 12:23:22 +01:00
2012-09-07 02:36:04 +02:00
2012-09-02 16:10:57 +02:00
2012-12-20 22:31:51 +01:00
2013-01-04 15:12:31 +01:00
2012-10-30 17:33:18 +13:00
2013-02-07 14:13:36 +00:00
2013-01-29 12:57:03 +08:00