-
Improvement
-
Resolution: Fixed
-
Minor
-
3.7
-
MOODLE_37_STABLE
-
MOODLE_38_STABLE
-
MDL-66020-master -
Form elements date_selector and datetime_selector initialize javascript in the constructor instead of when they are rendered.
This breaks the following scenarios for modal forms:
- Initialise an instance of the form
- Check if form was submitted,
- if yes
- do something, redirect, return true.... whatever needs to be done. Except that form does not need to be rendered after it was submitted
- if not
- start collecting javascript requirements
- render form, capture output
- return html and js
As a result the JS does not contain the js needed for the calendar icon in date selector.