From 3045005295c679c69718af893644417062ba457a Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Wed, 10 Feb 2021 15:38:19 +0100 Subject: [PATCH] MDL-64554 core_form: Move strings to outputrequirements.lib --- lib/formslib.php | 1 - lib/outputrequirementslib.php | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/formslib.php b/lib/formslib.php index 5190e548d56..8701bbd2e8e 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -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))); } diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index d18b9f503f7..39717953eb1 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -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',