MDL-64554 core_form: Move strings to outputrequirements.lib

This commit is contained in:
Marina Glancy 2021-02-10 15:38:19 +01:00
parent 440073ff20
commit 3045005295
2 changed files with 3 additions and 1 deletions

View File

@ -3143,7 +3143,6 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
if (count($this->_collapsibleElements) > 1) {
$this->_collapseButtons = $this->_collapseButtonsTemplate;
$this->_collapseButtons = str_replace('{strexpandall}', get_string('expandall'), $this->_collapseButtons);
$PAGE->requires->strings_for_js(array('collapseall', 'expandall'), 'moodle');
}
$PAGE->requires->yui_module('moodle-form-shortforms', 'M.form.shortforms', array(array('formid' => $formid)));
}

View File

@ -1684,6 +1684,9 @@ class page_requirements_manager {
'error',
'file',
'url',
// TODO MDL-70830 shortforms should preload the collapseall/expandall strings properly.
'collapseall',
'expandall',
), 'moodle');
$this->strings_for_js(array(
'debuginfo',