Skip to content

Commit

Permalink
MDL-64554 core_form: Move strings to outputrequirements.lib
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Feb 17, 2021
1 parent 440073f commit 3045005
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/formslib.php
Expand Up @@ -3143,7 +3143,6 @@ function startForm(&$form){
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)));
}
Expand Down
3 changes: 3 additions & 0 deletions lib/outputrequirementslib.php
Expand Up @@ -1684,6 +1684,9 @@ public function get_end_code() {
'error',
'file',
'url',
// TODO MDL-70830 shortforms should preload the collapseall/expandall strings properly.
'collapseall',
'expandall',
), 'moodle');
$this->strings_for_js(array(
'debuginfo',
Expand Down

0 comments on commit 3045005

Please sign in to comment.