diff --git a/Changes.md b/Changes.md index 90609f1..a1e15f3 100644 --- a/Changes.md +++ b/Changes.md @@ -3,6 +3,7 @@ Version Information Version 403.1.1 - TBR -------------------------- +1. Fix 'Image Icon and Video Icon: Browse Repository button does not get any action to proceed to next screen' - #29. Version 403.1.0 - 08/10/23 -------------------------- diff --git a/classes/output/core_renderer_toolbox.php b/classes/output/core_renderer_toolbox.php index 48f17f0..b6157b7 100644 --- a/classes/output/core_renderer_toolbox.php +++ b/classes/output/core_renderer_toolbox.php @@ -690,6 +690,21 @@ public function mform_element($element, $required, $advanced, $error, $ingroup) } } + // Generate the form element wrapper ids and names to pass to the template. + // This differs between group and non-group elements. + if ($element->getType() === 'group') { + // Group element. + // The id will be something like 'fgroup_id_NAME'. E.g. fgroup_id_mygroup. + $elementcontext['wrapperid'] = $elementcontext['id']; + + // Ensure group elements pass through the group name as the element name. + $elementcontext['name'] = $elementcontext['groupname']; + } else { + // Non grouped element. + // Creates an id like 'fitem_id_NAME'. E.g. fitem_id_mytextelement. + $elementcontext['wrapperid'] = 'fitem_' . $elementcontext['id']; + } + $context = [ 'element' => $elementcontext, 'label' => $label,