MDL-78527 pear: Adding attributes parameter to groups

This commit is contained in:
Amaia Anabitarte
2023-09-12 09:59:36 +02:00
parent 0122c2c3e7
commit 313da3ebf3
4 changed files with 16 additions and 8 deletions
+4 -2
View File
@@ -383,10 +383,12 @@ class HTML_QuickForm_element extends HTML_Common
{
switch ($event) {
case 'createElement':
static::__construct($arg[0], $arg[1], $arg[2], $arg[3], $arg[4]);
static::__construct($arg[0], $arg[1], $arg[2], $arg[3], $arg[4], $arg[5]);
if ($caller->getAttribute('data-random-ids') && !$this->getAttribute('id')) {
$this->_generateId();
$this->updateAttributes(array('id' => $this->getAttribute('id') . '_' . random_string()));
$attributes = $this->getAttributes();
$attributes['id'] = $this->getAttribute('id') . '_' . random_string();
$this->updateAttributes($attributes);
}
break;
case 'addElement':