The displaying of advanced items has been refactored. The changes are:
* The Advanced button is replaced by the Show Less/More link
* The Show less/more link controls advanced elements only within the section
it is located at
* The Show less/more state of sections is preserved between form submissions
* When javascript is off, all advanced elements will be displayed by default,
no show/hide controls will exists on the page
This was discovered while working on MDL-32705. If some JavaScript (for
example a select all/none link) changes the state of some form fields,
then the disabledIf state of other form elements does not automatically
update.
The existing form JS was so well encapsulated that this was impossible.
This change pokes a hole in the encapsulation, and provides an API
M.form.updateFormState(formid);
that other bits of JS code can call when necessary.